I've been trying to wrap my head around the Local Storage object, but many of the tutorials only show how to save and retrieve a single value. But the asynchronous nature of this feature is the main thing throwing me for a loop -- at first I thought I had to request and retrieve values in sequence. Fortunately, last night I think it finally "clicked".
This works, right? (I also need to check if the items exist and create them if they are missing, but I know how to do that.)
On start of layout:
get item "player"
get item "score"
get item "sound"
Set group "START GROUP" Deactivated
On item "player" get
System -> Set item global_player to localstorage.itemvalue
On item "score" get
System -> Set item global_score to localstorage.itemvalue
On item "sound" get
System -> Set item global_sound to localstorage.itemvalue
I think I can even deactivate OPTIONS GROUP using "On All Gets Complete" right?