How do I Stop simple parallel from running infinitely?

I followed this video…
AI Strafe In Circle Behavior Tree UE4 Tutorial - YouTube

I have discovered that my AI will play the simple parallel forever. I need my AI to move on to the next sequence and attack.

Strafing set up

I would build focus into the strafing task, and give strafing a timeout that leads to a finish execute success, then ditch the simple parallel.

Basically, it sounds like focus is never ending, so strafing is running forever.

It’s not working. Instead the AI just stands still after coming close to the Player or turns away then stops. I might have to scrap this code altogether and try something else.

You have to call “Finish Execute” and set it to success or fail like @DeathKwonDo mentioned or the task will be stuck forever.

1 Like

Can I see your current set up? If you want to go with the simple parallel, then swap the tasks over so the main task (Purple) is strafing, and the other (grey) is Focus. This way it will continue to focus on the player until it is finished strafing (the main task), which the script above doesn’t do! There needs to be a timeout or completion condition in there.

That tutorial is not a good one.

1 Like

Yeah, the tutorial isn’t good. I’ve been playing with different nodes based on our previous convo.

The behavior tree remains stuck, unfortunately.

So, I brought back the simple parallel and flipped them. Nothing changed. Its still infinite. Are there better tutorials on how to make an enemy AI strafe? One that won’t break my behavior tree.

Have you tried this way?

1 Like

Okay so I stopped the infinite simple parallel problem. Thank you devs for the ideas and aiding in the solution!

@L.F.A I isolated the simple parallel and added on to that idea

1 Like