# Tilemaps connecting by doors

**URL:** <https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115>\
**Category:** Help\
**Created:** [October 28, 2020, 2:10am UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115 "2020-10-28T02:10:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [October 28, 2020, 2:10am UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/1 "2020-10-28T02:10:53Z")

</div>

I’m trying out the tilemaps extension and im trying to figure out how to connect the tilemaps together. There’s a block where you can connect by doors but I don’t know how to use them. Anyone know what to do?

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [October 28, 2020, 7:25pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/2 "2020-10-28T19:25:46Z")

</div>

I have no idea i’m just here to give you emotional support. _blep_

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [October 28, 2020, 7:33pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/3 "2020-10-28T19:33:19Z")

</div>

thank you ❤

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 28, 2020, 9:26pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/4 "2020-10-28T21:26:23Z")

</div>

I tried creating two tilemaps, but I could not figure out how to connect the two by a ‘Door’. I did find this discussion which might help.

> [@List of features for every Level](https://forum.makecode.com/t/list-of-features-for-every-level/2373):
>
> Hi Makecode Team, My student (9yr old) and I am trying to create a game similar to Dangerous Dave (from my childhood) and are looking for a neat way to create a list of features in every level so that we can spawn the sprites and destroy them at the start and end of every level respectively. Here is where we are now - Level 3 [Git repo of DaveAwesome for Arcade](https://github.com/MINTGenie/daveawesome.git). Please suggest some ways to implement this. Feel free to also make other design suggestions. Warm regards MINT Genie

The help documentation, the link shown when installing the extension, does not explain what every block does.

> **[tilemaps](https://arcade.makecode.com/pkg/microsoft/pxt-tilemaps)**
>
> An extension for handling multiple tilemaps and extra tilemap blocks.

Otherwise you could ask Richard.

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [October 28, 2020, 9:38pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/5 "2020-10-28T21:38:57Z")

</div>

Thank you! I’ll use this information and if needed ill ask Richard!

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [October 29, 2020, 3:22pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/6 "2020-10-29T15:22:59Z")

</div>

@richard could you maybe help with connecting two tilemaps together with the extension like in this post?

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [October 29, 2020, 3:24pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/7 "2020-10-29T15:24:39Z")

</div>

two tilemaps… hmm… I tried this before and I did a block where it says `if mysprite overlaps (some kind of block) then place him into new tilemap and on a random block` That’s what I do

---

<div class="post-metadata">

**Author:** ![timber](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@timber](https://forum.makecode.com/u/timber)\
**Post date:** [October 29, 2020, 3:42pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/8 "2020-10-29T15:42:07Z")

</div>

I’ve done it the same way that Dreadmask197 suggested. If your rooms are the same size, you could also define a North, South, East, West column and row locations and place your sprite at the appropriate one when entering a room. I think the issue with this method is that it gets a little cumbersome when you get above 3-5 rooms

The advanced live stream gets into room switching in this live stream:

https://www.youtube.com/embed/QrCsFRg5ArA?feature=oembed&wmode=opaque&list=PLMMBk9hE-SeoHWvTpdezyL9JfF0tocJUT

Might be a little advanced for a 9 year old student though, but it could give you some ideas that you could simplify.

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [October 29, 2020, 3:56pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/9 "2020-10-29T15:56:18Z")

</div>

umm… you have to be 13 or older to make a forum account

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 29, 2020, 4:05pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/10 "2020-10-29T16:05:19Z")

</div>

> [@timber](#):
>
> Might be a little advanced for a 9 year old student though, but it could give you some ideas that you could simplify.

@timber never said he was 9. If he was, then maybe he has a parent accompanying him.

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [October 29, 2020, 4:08pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/11 "2020-10-29T16:08:26Z")

</div>

True. I never said that he was 9 though. I just said. Sorry for mistaking your age @timber

---

<div class="post-metadata">

**Author:** ![timber](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@timber](https://forum.makecode.com/u/timber)\
**Post date:** [October 29, 2020, 4:11pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/12 "2020-10-29T16:11:27Z")

</div>

Oops…that was my mistake. I got the age from the other post someone shared above. Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 29, 2020, 5:16pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/13 "2020-10-29T17:16:27Z")

</div>

Here’s an example:

> **[door-worked-example](https://arcade.makecode.com/78306-73899-03440-54795)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I added comments to explain the code. Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![rurikvp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rurikvp/32/4590_2.png) [@rurikvp](https://forum.makecode.com/u/rurikvp)\
**Post date:** [July 19, 2021, 9:21pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/14 "2021-07-19T21:21:50Z")

</div>

thanks, your code is so beautiful 😭

obs: i tried for hours and sorry for this crippie text i am Brazilian

---

<div class="post-metadata">

**Author:** ![biscuit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/biscuit/32/4404_2.png) [@biscuit](https://forum.makecode.com/u/biscuit)\
**Post date:** [July 23, 2021, 10:38pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/15 "2021-07-23T22:38:08Z")

</div>

I have done this before! It is actually quite easy! All you have to do is use the on sprite of kind () overlaps (tile) at location block. When it overlaps the door, set the tilemap to whatever you want the next one to be. To keep track of what room you are in for different things within the game, I like to use variables. Hope that this will help you!

---

<div class="post-metadata">

**Author:** ![ursoidd](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ursoidd/32/34551_2.png) [@ursoidd](https://forum.makecode.com/u/ursoidd)\
**Post date:** [August 5, 2021, 4:49pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/16 "2021-08-05T16:49:04Z")

</div>

i am brazilian too

---

<div class="post-metadata">

**Author:** ![ethan](https://avatars.discourse-cdn.com/v4/letter/e/8dc957/32.png) [@ethan](https://forum.makecode.com/u/ethan)\
**Post date:** [April 8, 2024, 8:14pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/17 "2024-04-08T20:14:32Z")

</div>

Is there supposed to be no code?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 9, 2024, 5:17pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/18 "2024-04-09T17:17:13Z")

</div>

@ethan not sure what you’re referring to, I see code in that project

---

<div class="post-metadata">

**Author:** ![ethan](https://avatars.discourse-cdn.com/v4/letter/e/8dc957/32.png) [@ethan](https://forum.makecode.com/u/ethan)\
**Post date:** [April 9, 2024, 6:03pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/19 "2024-04-09T18:03:52Z")

</div>

There isn’t…

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 9, 2024, 6:04pm UTC](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115/20 "2024-04-09T18:04:46Z")

</div>

![arcade-screenshot (7)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a6e5ee77d2d94efa38cea4f33a983e82b0a783b2.png)

[Next page](https://forum.makecode.com/t/tilemaps-connecting-by-doors/4115.md?page=2)
