How do I save a global boolean variable?
Save where?
In the localstorage
so that you leave the game and re-enter it the global boolean variable is still the same as before you left the game
Here is a screenshot:
imgur.com/a/bgc8rw8
I recommend using number variables instead of boolean, it's easier - simply set 1 for true, 0 for false.
Develop games in your browser. Powerful, performant & highly capable.
thanks, but I have a boolean variable in the properties bar at instance variables how do I get it to the event sheet because when I save it there in localstorage the boolean variable of the proporties bar is not there how can I save it?
Instance variables are saved the same way.
imgur.com/a/6aFBtC6
it doesn't work but somehow I can't send a screen shot so you can see what I did wrong I tried, everything but I get an error that it doesn't work