Platform Builder Forums

Help and Support => Working with Platform Builder => Topic started by: Antikore on January 08, 2019, 10:14:07 AM

Title: This can be done?
Post by: Antikore on January 08, 2019, 10:14:07 AM
Set a variable with placeholders in the name.
For example:
Code: [Select]
game var healthState.[health] = 1For example, to change a variable that is different depending on the health you have.
Someone can tell me if this can be done?
Title: Re: This can be done?
Post by: TingThing on January 08, 2019, 04:37:32 PM
I never accounted for that kind of trick when I made the command prompt. However, there's a possibility it might actually work that way. In theory, the [bracketed] section would be changed to it's value, and that value would be included as part of your variable name. You would end up with a unique variable for every possible health value.


This has never been tested, but it is worth trying. Let me know it it actually works.
Title: Re: This can be done?
Post by: Antikore on January 09, 2019, 08:32:35 AM
If not, will be cool to have it working properly. Anyways, I didn't test in depth but it seems to work with the variable:
Code: [Select]
game var Highscore.[area] = 1The problem is when you use a placeholder to show up the value, you need to put like this
Code: [Select]
[game var highscore.[area]That's strange because it has two "[" and only one "]" to work
Title: Re: This can be done?
Post by: CGM on January 09, 2019, 05:09:05 PM
Hey! Antikore! I have an idea. How about when UPE comes out, you add all of your medley of suggestions into PB! How about that?
Title: Re: This can be done?
Post by: Antikore on January 09, 2019, 05:16:54 PM
It will be awesome, but I'm very bad when programming on GameMaker Studio (Both, 1 and 2). Probably in the future I will learn how to use it.
Title: Re: This can be done?
Post by: TingThing on January 09, 2019, 05:20:32 PM
For clarity, the UPE does't give you the opportunity to add stuff to Platform Builder. It only gives you the opportunity to edit individual games made with Platform Builder.
Title: Re: This can be done?
Post by: CGM on January 09, 2019, 05:22:59 PM
Oh. I didn't know that. Well, that's okay. So, you can't release a copy of PB that's been modified?
Title: Re: This can be done?
Post by: TingThing on January 09, 2019, 10:33:56 PM
Oh. I didn't know that. Well, that's okay. So, you can't release a copy of PB that's been modified?


What do you mean? Every time I release a new version of PB, it's a modified version of the previous version.


Releasing the UPE will not change the fact that I still own and control the source code for Platform Builder. It will only give people the opportunity to tweak with stuff for their own projects.
Title: Re: This can be done?
Post by: CGM on January 10, 2019, 06:38:44 PM
Oh! I think I get it now. Okay. But, I still am wondering about another similar matter in your latest announcement about the UPE.