[Solved] Make enemies flip then go other way

I tried so much tweaking how make these stupid guys get to my invisible object collide say ok STOP Turn around and GO BACK! and visa versa

Do you have multiple snails? Then you could use an object variables instead. If you have multiple then each snail is changing the same variable. So, the most recent collision is setting the direction for all of the snails. An object variable would allow each one to change their own direction.

1 Like

ok object variable so i copy and pasted the same snail object all over level as the only enemy

That may be my issue.

Ok tested with just 1 on screen same error they just flip slide through my go left or go right objects and keep going they NEVER go other way collison or not

unrelated note: do you know about boolean variables?

about the topic: try a, “for each” event

Yes Booleans T or F but I’m saying when one hits my collision instead of flipping and going opposite way they either glitch… go through it without flipping or flip and go through it… or glitch flip and get stuck but NEVER goes opposite way.

I have only 1 enemy on scene for testing purposes nothing has changed doesn’t matter if 1 or 900000 it acts the same way regardless how I alter code

A_____M_____B When M has collision with B flip the sprite then go towards A then when M has collision with A flip sprite the go towards B rise and repeat Infinium

The way I always do this is to use an object text variable called Right

events

Video

FIXED thanks a lot. took me having several monitors to follow letter by letter but I did it… still finishing my core looking for a Pixel Artist

I am good at pixel art. do you have a discord?

1 Like