# {tile} to the \[left/right/top/bottom\] of {mysprite} is wall

**URL:** <https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108>\
**Category:** Help\
**Created:** [October 10, 2024, 5:54pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108 "2024-10-10T17:54:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)\
**Post date:** [October 10, 2024, 5:54pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108/1 "2024-10-10T17:54:59Z")

</div>

the title is self explanatory, can someone make an extension to the tilemap that can check if the tiles in relation to a sprite are walls?

---

<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 10, 2024, 6:02pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108/2 "2024-10-10T18:02:52Z")

</div>

i don’t think you need a whole extension for this, it’s just a few blocks:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/c/fce5ddaca272e0db29be17bb67f12ff939bf01cc.png)

---

<div class="post-metadata">

**Author:** ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)\
**Post date:** [October 23, 2024, 4:12pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108/3 "2024-10-23T16:12:55Z")

</div>

no, i need a variable for the tile too, not just the sprite.

---

<div class="post-metadata">

**Author:** ![InvalidProject](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/invalidproject/32/32554_2.png) [@InvalidProject](https://forum.makecode.com/u/InvalidProject)\
**Post date:** [October 23, 2024, 9:14pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108/4 "2024-10-23T21:14:58Z")

</div>

![Screenshot 2024-10-23 12.57.12 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/7/072e8502f2ce65454dd765f81f020168190ad82b.png)

---

<div class="post-metadata">

**Author:** ![ADM\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adm_f/32/19808_2.png) [@ADM\_F](https://forum.makecode.com/u/ADM_F)\
**Post date:** [October 23, 2024, 9:15pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108/5 "2024-10-23T21:15:01Z")

</div>

Do you mean Location variable or Every of a certain type of tile

Just One tile Vs All of a type of tile

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [October 23, 2024, 9:15pm UTC](https://forum.makecode.com/t/tile-to-the-left-right-top-bottom-of-mysprite-is-wall/31108/6 "2024-10-23T21:15:07Z")

</div>

“tile to center of (mySprite)” can be used in the “(location) [column] and [row] blocks to separate the X and Y columns of the location. Then you can add + or - math to specify a different tile relative to the sprite
