How do we reset static variables to their default (initial) value?
I'm making a function that delete the savefile (since Construct doesn't provide an easy way to do so, which would be very useful btw ).
My "deleteSavefile" function does the following:
What I can't figure out how to do is to reset the static variables to their initial values. Right now, after calling this function, the player is sent to the title screen, but when clicking "New Game", it's not really a new game, because all static variables kept their values.
You folks have any tips for me? Thanks
Develop games in your browser. Powerful, performant & highly capable.
I'll guess you'll have to go the manual way. Set their initial value using a function and call that function whenever it's needed. Like when you are resetting the save.
Ah, really? That's annoying :S