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:
- Clear local storage
- Reset global variables to default
- Reset persistent objects
- Send the player to the title screen
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