Doors help?

So, I’m using the tile-util extension in a game I’m making, and trying to use doors. I’ve seen richards post about how to use doors, and it says to change the sprites position when the new tilemap has loaded to prevent them going back and forth between tilemaps infinitely and glitching. The thing is, when I go from one tilemap to the next in one direction, I need to change by y. But if I go back the other way, I need to change position by -y. IN my game, there would be many occurences of this, involving both -y, -x, y, and x. So how do I make it move in the right direction?

Heres my code:

ignore most of it 9the code), but when the game loads just immediately jump and it will glitch. I’ll put a comment on the blocks you need to look at so you can see them.

Thanks so much for taking the time to read this!

So I think you need either a scrolling map or just make it intereactible I sadly don’t have that much knowledge too help

1 Like

I believe one issue is that when it transitions upward, gravity will bring you back downward. So, try to avoid up/down transitions.
Also, for the difference between x, y, -x, and -y, just use an if statement with the condition being whatever tilemap you go to. Something like “if: tilemap=(tilemap), then change mysprite position by (value)”
Ps, I tried using this extension for one of my games, and it became super laggy as it loads all of the tilemaps at once, so if you can get away without using this method, then it will be ideal. :slight_smile:)

1 Like

Oh, thanks for telling me! :sweat_smile: