How do i find out is two sprites are on the same tile-map column or row?

I need to tell an enemy that it’s lined up with the player on the tile map. How do I do that.

You could check if the player’s x and y poisiton is the same as the enemies.

but i need the col and row
not x and y

Hmm, I could have a solution. Do you have the camera moving around or staying still?

Moving

Woah thanks my solution was a lot harder than that one- I’ve never understood those blocks before!

Oh, that makes sense. I was trying to use those blocks but they never worked.