[Solved] Flip sprite if on left or right of an object

Forgive me (if I’m asking simple question). I’m new to GDevelop logic.

I have a sprite (apple) in the middle of the screen. Another sprite (Ant) spawns from the 4 corners.
I have worked out how to compare using compare-two-numbers = Ant.X() < Apple() then Flip=YES

but my argument doesn’t work as I cannot find ELSE.

So if ANT is on the left of object (APPLE):
FLIP ANT=YES
ELSE
FLIP ANT=NO

Can somesome please assist.

Thanks,
Rob

Hi you can add a condition like this
image
Replace Fireball for Apple and Boss1.X for Ant.X then do your action in kind.

2 Likes

Fantastic!!! That worked a charm. Thank you soooooooooooo much.

1 Like