I’ve added back to start and reset from checkpoint buttons to my game, but revisited old scenes are kind of buggy due to scene and global variables
There are only a few global variables so its easy to reset the necessary ones for when a reset is done, but certain scenes have a lot of variables, like this.
Adding an “at the beginning of scene” with events that set each variable to their starting values does work, but it took several minutes to write all of this even with copy-pasting. Is there any way to have every scene variable reset to its default in one event?
Bonus question: do scene and objects variables reset on their own? I’d expect the scene timers that don’t start/reset at the beginning of the scene to be problematic, but in the scenes I’ve tried so far, they aren’t affecting anything, at least not large enough to notice.
hello. pretty sure all scene variables are reset at the beginning of every scene. thats the point of a scene variable. to reset all scene variable do: change the scene and set it to the same scene. (although that resets the WHOLE scene including objects)
Scene Variables + Object Variables + Timers: Reset automatically when you start the scene again.Timers are removed and do not exist until you start them from your events. For Object Variables they also reset when you delete the object, as each object has its own individual variable.
Keep in mind that RESUME screen does not count as resetting the screen.
Global Variables: Reset ONLY when you close and reopen the game
Unfortunately we don’t have an easy way to reset the global variables without closing the game, as far as I know.
What I do for it, is to have all my important Global Variables inside 4-5 structures. Then when you first open the game I have an Initalisation scene where the game saves all of them into a JSON and then load them when my characters dies to reset the global variables.
But it would be cool if we could get an easier method to do it at some point.