# Tilemaps won't update when changing tiles

**URL:** <https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160>\
**Category:** Arcade\
**Created:** [February 4, 2020, 10:46pm UTC](https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160 "2020-02-04T22:46:51Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [February 4, 2020, 10:46pm UTC](https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160/1 "2020-02-04T22:46:51Z")

</div>

Hi there, I am trying to make an “escape room” sort of game. Levels 1 - 7 work perfectly fine, but when I try to change a tile of a closed chest to an open one, it doesn’t do so. Changing an “on” lever to the “off” position doesn’t show, but the code after it that changes the lava to the floor works fine.

Here is my code: [https://github.com/unsignedarduino/escape-the-dungeon](https://github.com/unsignedarduino/escape-the-dungeon)  
(Please excuse my ugly code 😛)

TL;DR: I am making an escape room game. Levels 1 - 7 work. Only some of level 8’s tiles update when changing tiles.

Thank you for your help in advance!

---

<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:** [February 5, 2020, 12:08am UTC](https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160/2 "2020-02-05T00:08:19Z")

</div>

WOW! That game is awesome!

You have found a bug! I’ve opened an issue for it here: [https://github.com/microsoft/pxt-arcade/issues/1737](https://github.com/microsoft/pxt-arcade/issues/1737)

Basically, the issue is that the open chest tile doesn’t appear anywhere in the tilemap.

You can work around it by opening your tilemap, adding an open chest, and closing the tilemap editor. You can probably even delete the open chest from the map after is has been added at least once.

---

<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:** [February 5, 2020, 12:19am UTC](https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160/3 "2020-02-05T00:19:25Z")

</div>

> [@richard](#):
>
> WOW! That game is awesome!

Thanks. 🙂

> [@richard](#):
>
> You have found a bug! I’ve opened an issue for it here: [https://github.com/microsoft/pxt-arcade/issues/1737](https://github.com/microsoft/pxt-arcade/issues/1737)

Thank you for doing that too. I was going to plan on doing it if I didn’t find a solution.

> [@richard](#):
>
> You can work around it by opening your tilemap, adding an open chest, and closing the tilemap editor. You can probably even delete the open chest from the map after is has been added at least once.

And it obviously works. (After I used the open chest in the tilemap at least once, I could delete it.) Thank you so much! 😄

---

<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:** [February 5, 2020, 12:32am UTC](https://forum.makecode.com/t/tilemaps-wont-update-when-changing-tiles/1160/4 "2020-02-05T00:32:32Z")

</div>

No problem! Thanks for reporting the issue!
