# i want to change the tile I just left

**URL:** <https://forum.makecode.com/t/i-want-to-change-the-tile-i-just-left/10845>\
**Category:** Help\
**Created:** [November 12, 2021, 5:52pm UTC](https://forum.makecode.com/t/i-want-to-change-the-tile-i-just-left/10845 "2021-11-12T17:52:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArboTeach](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/arboteach/32/2990_2.png) [@ArboTeach](https://forum.makecode.com/u/ArboTeach)\
**Post date:** [November 12, 2021, 5:52pm UTC](https://forum.makecode.com/t/i-want-to-change-the-tile-i-just-left/10845/1 "2021-11-12T17:52:02Z")

</div>

My plan is to make a maze that you must get to all for corners but can’t backtrack on so a wall will appear behind you non the blocks you have already been on

I am using on overlap at location and changing the tile at location but that changes the block you are headed to not the one you just left.  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [November 12, 2021, 9:29pm UTC](https://forum.makecode.com/t/i-want-to-change-the-tile-i-just-left/10845/2 "2021-11-12T21:29:17Z")

</div>

Hi, ArboTeach!  
Here’s a link to a project that lets you do a one-way maze!

> **[stream - don't backtrack!](https://arcade.makecode.com/81431-39479-09184-48833)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

We added a variable called ‘last tile stood on’ that will check to see if you’ve left the tile.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b1933883e4fd0eb856d7ddaa42f5fcb2648e82da.png)

It works with a one-wide tile pathway and if your character is smaller than 16x16.

Richard also came up with a more Advanced™ technique that uses a sprite following behind you to check if you’ve left the tile. This will be good for wider paths and in general More Stable.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/5313c2ca93f584af0833a5febac1a0b086a246a5.png)

> **[Untitled](https://arcade.makecode.com/53171-31702-62120-46276)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Hope this helps!  
Vivian 😊
