Reset Global variables to default values.

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • An Action to reset global variables back to their default value would be nice. so that If you use them to move from layout to layout and you start a new game it will set them back to their defaults.

  • I don't remember if such feature was implemented anywhere. If you were to provide "Reset Global Values", it'd be only natural to consider adding this feature for PVs, arrays and stuff.

    I find workaround too easy and too intuitive to add such feature.

  • Intuitive yes but practical to program: no.

    If I have 30 variables that need to be reset back to default values I am supposed to write out 30 events and search through them every time I change the default value I have to slog through the events and change it again.

  • You're supposed to write 30 actions in 1 event, not 30 events. That'd take about 2-5 minutes.

  • You still have to write all the code how is that easier than "Reset variable"?

  • You don't see my point. You shouldn't add feature "reset" to global variables alone. PVs are also variables and they should be provided with the same ACEs as global variables. That's the consequence in programming. And I'd be really disappointed to see that PVs vectors are written twice in memory (original values and modified in runtime).

    To tell it short, you shouldn't add wild ACEs.

  • First off Global variables are easier to pick. PVs you have to pick an specific object of who's variable to reset and what happens if you cant pick them right?

    Why do global and Private need to have the same ACES? They should yes but they don't need to. The fact is something like reset back to default variable would be very useful weather they implement it is up to the devs and the devs alone.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think this would be a useful feature, both for global and private variables.

  • Storing copies of instance's PVs for every object would take too much memory. Construct aims to have great performance.

  • Eh, you're probably right. Okay, then... if it can't be done for PV's I still think it would be a good feature to have for globals.

  • although i must say i would rather have the devs focus their efforts on other stuff tbh But if this would be really easy to implement then maybe..

  • no use to do it for PVs, when you want to reset a game you reset all the GVs, because they will always keep their value, PVs wont.

  • Load the default values from hashtable, ini or other data object into global variable. Sorted.

  • It's addable, but it'd be best for us to focus on other things, as this can be manually done.

  • Load the default values from hashtable, ini or other data object into global variable. Sorted.

    Im not looking for a way to do this If I needed help doing it I would have posted it in the Help section. I just thought it would be easier to have something like this thats all.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)