Hey, I have this map selection screen with the same sprite over 30 times, when pressed it goes to the level if instance variable locked = 1, if its 0 it doesn't do anything.
In each level when finished, like enemy killed, I collect an inst. variable from that enemy to a global variable that in the sequence when go to the level selection the global variable is compare to the level selection button, if they are the same number then the level button changes to 1 (to unlock the level)
So things are kind of working, you kill enemy w/ n. 2 on the level, go to level selection and the level 2 button is unlocked and you can play that new level, but on level 3 you kill enemy w/ n. 3 and then again unlock level 3 but all the previous levels (2) will be locked back because the instance variable Locked was reset back to 0.....
I cannot make these sprites global because they are repeated many times and must have different variable numbers
Hope I made myself understandable. How can I keep the "locked" instance variable saved? Whats the most practical way?
I have tried PERSIST but messes up a lot of stuff... sometimes sprites are destroyed...
the buttom for the level selection is the same sprite as the enemy... when is lock it is black and white, when unlocked it is colored (changes animation)