the toggles are hidden at the beginning but ive looked at it with them visible, after 15 seconds (that green box fills) they just ignore the toggle and don’t change direction
Solution-
My “Solution” was to use a timer to effectively “double check” if they are still in collision after half a second.
It’s hard to tell from what you’ve provided, mainly because we wan’t see where the toggle object is. However, it sounds suspiciously like there’s an enemy that’s in contact with the toggle object when a second one collides with it.
Because the first enemy is still colliding with it, the event won’t trigger and subsequently the second enemy won’t turn. And so there will always be an enemy touching the toggle object, and the event will never get fired again.
Note, the trigger once applies to the object type, not each instance of the object.
Sorry about the lack of detail. Theres enemy spawners on the ceiling that spawn enemies every 2 seconds. The toggles are placed only in places I want them to turn around
(eg. of the toggles)
You’re correct about why its breaking, I came to that conclusion a little while ago and I tried the solution from that other post but it didn’t work still.
I’ve been pretty stumped about how to fix it without figuring out a completely different method for the enemy to move and have that same effect.
Hmmm, the timer solution still has the potential for problems though. For example, if the enemy is in collision with the toggle object for 2 successive frames, it’ll continuously toggle the state.
The work-around from the link does work, and it’s a pretty problem-proof solution. If you’re willing to give it another shot, we can always help if it doesn’t appear to work for you.