# Doors help?

**URL:** <https://forum.makecode.com/t/doors-help/34882>\
**Category:** Help\
**Tags:** extension\
**Created:** [March 25, 2025, 1:09pm UTC](https://forum.makecode.com/t/doors-help/34882 "2025-03-25T13:09:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dogSquid](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dogsquid/32/26689_2.png) [@dogSquid](https://forum.makecode.com/u/dogSquid)\
**Post date:** [March 25, 2025, 1:09pm UTC](https://forum.makecode.com/t/doors-help/34882/1 "2025-03-25T13:09:14Z")

</div>

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:

> **[Bumpy - Copy](https://arcade.makecode.com/S66271-38559-77839-16799)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

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!

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [March 25, 2025, 10:08pm UTC](https://forum.makecode.com/t/doors-help/34882/2 "2025-03-25T22:08:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tasty\_turnip2](https://avatars.discourse-cdn.com/v4/letter/t/e9c0ed/32.png) [@Tasty\_turnip2](https://forum.makecode.com/u/Tasty_turnip2)\
**Post date:** [March 26, 2025, 8:42pm UTC](https://forum.makecode.com/t/doors-help/34882/3 "2025-03-26T20:42:52Z")

</div>

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. 🙂)

---

<div class="post-metadata">

**Author:** ![dogSquid](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dogsquid/32/26689_2.png) [@dogSquid](https://forum.makecode.com/u/dogSquid)\
**Post date:** [March 28, 2025, 5:00pm UTC](https://forum.makecode.com/t/doors-help/34882/4 "2025-03-28T17:00:22Z")

</div>

Oh, thanks for telling me! 😅
