I haven't really played around with LocalStorage much, but all I can tell is it's completely inferior to the older webstorage plugin.
I'm trying to do the following and having a heck of a time figuring out the best way to do it.
I have multiple dictionaries, arrays, and global variables that I need saved. In the game, you can have multiple saves to a saveslot, similar to the "save" under the system actions. I then need to be able to get access to the name of all the games (as well as a couple other stats) that exist to put the data into a list that you can select from.
My original idea was to save everything to a single dictionary, save it to the local storage using AsJson, and then also save a separate local storage called "gameName" (the value of this would be "gamename1;game1time;%completion-gamename2;game1time;%completion-gamename3 " etc. etc. Then, in order to create the list to select from I would do
repeat(tokencount(LocalStorage.ItemValue, "-")[/code:w2yccgcl] times, and set everything according to
[code:w2yccgcl]tokenat(tokenat(LocalStorage.itemvalue, loopindex, ";"), <textinstance>, "-")[/code:w2yccgcl]
I assume you're lost by now - me too. Can anyone else think of a better way to do this? I don't want to use the built in save and load function because I need more control over it. The constant "check if item exists, check if item has been gotten after it exists" is super clunky and confusing. It's making it very difficult to organize this in the way I have my event sheets, functions, and variables.
I'd love to not have to resort to saving to a txt file, but will if I have to.