The idea is save all the events possible and do all in the properties and in an interface similar to the "instance variables".
Every time i have to use the Local Storage plugin i have to read the doc and the examples, not's much intuitive at least for me and a bit frustrating to do some things.
I want to do some kind of achievements/trophies to my game , i posted here () but put here a pic of what i mean:
So, why not if we can get all in a "Local Storage" interface like the "instance variables" and properties in the object to automatize the process and avoid all this events.
I made some interface using the actual things to show the ideas:
So, we can add variables and set what value in case of missing, maybe 0, maybe a text saying "locked" or whatever and the moment we want this one gets saved.
In the properties we have when load the storage keys. In this case on start the layout "Gameplay" load all the storage keys, in case some ones are missing we already have set the number/text. Other possibilities can be added, and if somebody needs to be more specify always can continue use the events. Or if there are some keys that we don't want to load maybe add another tab in the interface for each key saying "Yes/No" to be loaded using events for any reason.
So, we have all this configured in a moment and without events, now is time to set/save values in the local storage... or not!. If we are using a Global Variable called Best_Score , we can link/pin to a Key in the "local Storage" and in their interface we already set when save it like On Change/On Start Layout/Every tick , etc....
If you link a Global Variable to a Key in the local Storage, when the Keys in the Local Storage are loaded they also set the global variables. After that, when a global variable changes will change the key linked.
Maybe there are things that can't be done for some reason, but as i said the idea is avoid all this events of: Read if exists, get item, set value, if key missing, blablabla.... get something more visual/intuitive and easy to access/use.