Enemy behavior problem

What I want: Enemies pathfind independently of one another, fire a few shots, and pathfind again in a loop.

What the code does: Enemies perform the loop a few times, then stop randomly.

Any ideas what I’m doing wrong?

For one, you’re using the trigger once conditions tool liberally. If the condition changes so the object won’t be selected the next time the events are run though, then don’t use a trigger once. It’ll be causing issues that are avoidable.

See this post for an explanation on why it’s not working as you hope. Post back if you still need help once you’ve digested the link.

So in summary; Conditions in a normal event, and actions in a foreach subevent?

1 Like

I left it running for a while and the enemies are still looping.
I think that’s problem solved. Thanks!