# How do I find where my sprite is on a tilemap?

**URL:** <https://forum.makecode.com/t/how-do-i-find-where-my-sprite-is-on-a-tilemap/10210>\
**Category:** Help\
**Created:** [September 27, 2021, 3:27pm UTC](https://forum.makecode.com/t/how-do-i-find-where-my-sprite-is-on-a-tilemap/10210 "2021-09-27T15:27:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoolSwords4](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/coolswords4/32/9222_2.png) [@CoolSwords4](https://forum.makecode.com/u/CoolSwords4)\
**Post date:** [September 27, 2021, 3:27pm UTC](https://forum.makecode.com/t/how-do-i-find-where-my-sprite-is-on-a-tilemap/10210/1 "2021-09-27T15:27:39Z")

</div>

I’m currently making a game, and if you step by a goblin, you will either lose health, kill it, or both. Except killing won’t work because if there are multiple goblins on a map, I need a way to find where my player is, then find where the goblin is.

Game: [https://makecode.com/\_cH4PpDWjV4Ue](https://makecode.com/_cH4PpDWjV4Ue)

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [September 28, 2021, 4:13am UTC](https://forum.makecode.com/t/how-do-i-find-where-my-sprite-is-on-a-tilemap/10210/2 "2021-09-28T04:13:44Z")

</div>

use the “if (type) (sprite) overlaps (type) (othersprite)” block and you can drag out the “sprite” and “othersprite” from the block and put them in your code.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/526a9476222f89abcf6f44b15ef29238de70bb8f.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f6245ca4891a630756800c87b74f38db749ecbcd.png)  
Then you can use those variables to do a specific sprite of a type even if multiple sprites are called the same thing

---

<div class="post-metadata">

**Author:** ![bob0212](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bob0212](https://forum.makecode.com/u/bob0212)\
**Post date:** [September 28, 2021, 4:13am UTC](https://forum.makecode.com/t/how-do-i-find-where-my-sprite-is-on-a-tilemap/10210/3 "2021-09-28T04:13:47Z")

</div>

I think I can help
