Login
Community
DARK THEME

Is there a way to reset a map to what it was before changing?

Hi, In my dungeon game, I have several sprites on the map that have loot on them. They get changed into regular floor sprites using the mymap.set() function when you collect the loot. If you then die though, when you restart the sprites don't reset. Instead, they remain changed to floor sprites. How do I make them reset?

You can start by creating a copy of your map using map.clone():

active_map = maps["mymap"].clone()

Then you can do any all the changes needed to your active_map. When you need to reset the game status, create a new clone of the original map.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community