I'm using the local storage for the first time. So for the test I would like to make a simple experience: you click on the square and it changes color. I want to use bool global variable. How do I store it locally?
Below is what I have:
On the bottom event the action is set turn_on to localstorage.itemvalue.
For the other events where you mentioned "turn_on" remove the quotation marks as this is not using the variable.
Expect a 0 or 1 when you take the value from local storage.
Develop games in your browser. Powerful, performant & highly capable.
So I tried the below, maybe I made some mistake there. Please let me know.
I also tried system - set bool, but it only allows to make bool true/false
That's a good point, I rarely use booleans. Better here if you use a global number set it to 0 or 1 for off and on. Then you can update that bottom event to set variable to local storage itemvalue.
Booleans are super cumbersome to deal with in Construct. I never use them.