So in my new game Mr. Jump
there are locked doors and keys When a door is unlocked the tile in front of it is changed to an enter door so that trying to open it again will send you to the next lvl
However, when i update the tilemap and then switch it out it reverts back to the unlocked door I’m unsure of why this happens as in other games replacing a tile replaces it forever in said tile map (similar to changing a image)
Keys work the same way place a key on a tile when you touch it delete the sprite and the tile
What I want to happen is that when you collect a key or open a door the change is permanent so you cant collect the key twice or unlock the same door twice
Yeah, this it’s annoying, but it makes some things easier, like if you want to restart a level the tile map also resets. When I made my Cat platformer game I had to make an array that kept track of which doors were open in which tile maps. You might end up having to do that, or make some other sort of variable system to keep track. If you try to understand how I did it in my code… good luck I guess.