Author Topic: This can be done?  (Read 2685 times)

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
This can be done?
« 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?
Sorry because my English is not very good because I'm Spanish ;) :P

TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1395
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: This can be done?
« Reply #1 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.

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: This can be done?
« Reply #2 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
Sorry because my English is not very good because I'm Spanish ;) :P

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: This can be done?
« Reply #3 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?

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: This can be done?
« Reply #4 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.
Sorry because my English is not very good because I'm Spanish ;) :P

TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1395
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: This can be done?
« Reply #5 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.

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: This can be done?
« Reply #6 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?

TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1395
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: This can be done?
« Reply #7 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.

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: This can be done?
« Reply #8 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.