How to make something happen if a sprite is behind another sprite

In my game, I want the boss to turn around when my sprite is behind it https://arcade.makecode.com/S31913-79314-08849-08052. This would be really helpful for game.

2 Likes

Something like
“If (player X [>] Boss X): set boss image to (boss facing right)
Else: set boss image to (boss facing left)”

That should work.

Can you show me what that would look like?

1 Like

1 Like

there is an On Overlap Block for this

Unfortunately, no there is not.

1 Like