Hello,
I am trying to setup a save system that can handle recording unique stats for each level in my Tower Defense game.
I have managed to create a Map Variable using a String+Structure. I can add unique lines, my level names, that then use the same structure of stats (enemies killed on this map, high score on this map, star rating, etc.).
At best, I can save the stats at the end of my round for the current map, but I then overwrite the data for all other keys in my map variable for some reason. In the image below I show how I get the current level name and Find to get the structure to update. I then set my stats and save. Currently the system is broken, I’m not actually saving and I’m trying to fix that as well, but I’ve succeeded to that point in the past.
As noted above, this is currently failing to save all my variables, I can see that on my level select screen, whose logic is shown in the image below. When I have succeeded in saving, this logic would produce the accurate stats for the last level played (and updated as in image 1), but ALL other levels are wiped to 0 for all stats…
If anyone can help me understand how to do what I set out at the start of the post, I’d truly appreciate it. I’ve been at this for 4 weekends now to no avail.
Thank you.