Doors
What good are keys if you cannot do anything with them?
Let's fix this by adding doors that the player can open with their keys. First draw a pair of sprites: an closed and an opened door. Just like with the key and chest sprites, be sure to put them right next to each other. This allows us to use the swap_tile function to open a door.


Add a sound effect for opening a door. This should be sound 02. Replicate
what is in the screenshot or create your own custom door opening sound.

Add a function open_door to open the door to the map code tab (tab 1).
This function gets called in the interact function, which is in the player code tab (tab 2)..
End Result
Save your changes with ctrl+S. Run them with ctrl+R. You should now be able to pick up a key and use it to unlock a door.
Download