Your second post was my question i had in mind .
I had A LOT of webstorage functions in my game and i now am trying to tune them to LocalStorage.
Somehow i do not get it working in any way. I can't even get a value to be written ( checking with debug LocalStorage shows empty ).
Could you tell me why this isn't working:
I use the "setup" key to set all values the very first time the game runs.
P.s. Sorry if i am hi-jacking your topic.
Well, as far as I can tell, you should have an action "Check item "setup" exists" in the "Start of layout" event, that would then trigger the "On item "setup" missing" event.
Also, the new LocalStorage is asynchronous. It means, there is a delay between the moment the action is encountered, and the action is executed.
In your first event, you likely restart the layout before any of the values are set to be written.
Consider them like AJAX requests, they may vary in the time and order taken for them to complete.
So here, that's where a "All requests complete" condition like Ashley is suggesting would be nice as Event nb 2 to which the action would be "Restart Layout".
Currently, I'd try to have a "On item "setup" set" condition/event nb 2 that would contain the restart layout action.