Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | w32.deadcode | |
Old Version | Published before Godot 3 was released. |
Hi, it ocurred to me that i don’t exactly know how to make an active map screen, like, say, the one in Super Mario Bros. 3. Of course having your character move across paths and selecting stages is not so difficult, however, say you have these ‘moving events’ like battles against hammer bros. or warships.
The game has to remember where they were on the map after you finish/lose a stage or otherwise their position would get reset constantly.
I came up with some solution, but find it very wonky:
Have some sort of array/list thingy in a global script that contains all events and their positions - it gets uptated when entering a stage and then when you leave back to the map it respawns all enemies according to that array.
However, something just keeps telling me that it is an overly complicated solution to a simple problem that’s just a side effect of me being a beginner programmer
So, ummm, does anyone know a simpler/more efficient/pRo0O way to implement this?
I imagine being able to keep the state of the mapscreen scene without throwing it from memory each time the you switch a scene but i dunno how to do that.