I'm not sure of why you want to use multiple arrays, is that to display the datas of each saves on a menu screen? Like health, level, weapons, etc
Oh, so I have 3 arrays, one called playerGameSave1, and 2 and 3. So, each array is going to be used for each "gameslot", that way I can have different values for the players stats and info for each load. SO, if you wanted to load game 2, then it reads from playerGameSave2.Json, and if it does not exist it creates the array information with default values so it doesn't mess with gameslot 1 or 3.
Each array will hold ALL of the game variables, global and local. The variables will be updated (global for example) when the array is loaded and overwritten when requested or upon autosave of that slot.
The current issue with LocalStorage I have at this moment is loading it. I did the proper loading setup, but it does not load into the array I select for it to load into, according to debug. Ill show my code for loading:
So, when the game starts, it will have a blank array and if not, it creates one. If you have never played the game, it will use that array to update, save, and then eventually load. So, say I changed things that needed saving. I update the values in the global variables, and local variables for gameplay, and then the array is updated and then saved AsJson in Local Storage. All is well so far. So, then the loading part.
LOADING:
Let me just simplify it. Say I have a button that when clicked, should load the Json into the proper array. I say when clicked, >LocalStorage > get item "[key used to save array]". In my case, this key is "gameData1". So after get item, I make another event saying: LocalStorage > On item "gameData1" get, action: with the proper array:Load from JSON string> LocalStorage.ItemValue.
This does not load the array. I do clear the previous array too in testing to see if it loads properly then wait before loading and still nothing loads. Hope that makes sense :) The info IS, in fact, correctly saved and its format is correct. So, the LocalStorage has this information in that specific key that cannot be loaded even with simple actions.