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

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

1 Like

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
image
Then you can use those variables to do a specific sprite of a type even if multiple sprites are called the same thing

1 Like

I think I can help