Saving / Loading to an array using the Fixed Value of the Group.Neutral not working
Oh man, and I was SO SURE this would work too :(
What I'm doing, and have been trying to do for a while now, is to have it so that my game saves which dirt blocks on the frame have been destroyed or not so when you reload the game those blocks will be gone. After many unsuccessful attempts at this I had an idea this morning that I was sure was going to work.
I wanted to use an array where the X part of it was the dirt block's fixed value. The dirt block also has the neutral qualifier (because I intend to have it save other things like destroyed barrels and etc this way if it works). What I'm doing is when the group.neutral's animation disappearing is playing, it writes the value 1 to the array like so:
Animation Disappearing "Group.Neutral" is playing
-> Write Value 1 to Fixed( "Group.Neutral" ) to the X slot of the array
Then when you quit the game it saves the array file to the game's folder. This part works.
When I go to load it all back though I load the array up and do this:
Start of Frame
-> Start Loop "dirt" 2000 times
On Loop "dirt"
+ValueAtX("array",LoopIndex("dirt")) = 1
+Fixed("Group.Neutral") = LoopIndex("dirt")
-> Destroy Group.Neutral
But it just doesn't work. I've tried re-ordering these conditions in case it made a difference but the dirt blocks never get destroyed upon load.
I mean this idea is pretty sound, isn't it? It'd be an excellent way to keep track of many destructibles in a big frame if I could get it to work.
Any ideas?