[SOLVED] Strange glitch with direction variable enemies

I have enemies with a “Direction” variable which changes when they hit either a ‘Go Left’ arrow or a ‘Go Right’ arrow.

0 = Right
1 = Left

And they have platform character behaviour so it simulates the Left or Right key press to move the character in that direction.

All works well until I have a few of the same enemy in different areas of the map, at which point it breaks and the enemy ends up going straight through the arrows.

The funny thing is, when this happens, all instances of the same enemy, everywhere on the level all go through the same side of their set of arrows.

So if Right breaks, it breaks for all of them.

I have several enemy types that use this mechanic, for instance fish, lemmings and snakes, but I only seem to have the problem with the snakes and even when they break, all the other arrows for all the other enemy types carry on working ok.

I have tried this with ‘For all instances of Snake’ in the events and without, but both end up breaking.

Why is this happening?

I have come across this same problem several times before with other platform game projects and I’m not sure of the cause or the cure for it.

Can anybody shed some light on it for me?

Sounds possibly like the same issue as: Multiple instances of an object colliding with another object get ignored

Yep it literally is the same thing and after reading through the linked post I figured that the issue is simply the ‘Trigger Once’ command on the collision detection event… removing that has solved it, thanks for the link!