AI Behavior Tree Loop


Hi, I’m trying to make a behavior tree for a character, here’s the behavior tree of the character for now. I want the character to wait first, then it will chase the player(if possible) then attack the player in range. Also in the BTTask_Enemy_ShootProjectile i made if the enemy somehow health is below 300 then it will start shooting projectile.
This Behavior tree works nromally, but it only did the task once. How do i make it so it will happens as long as the actor(enemy) is alive? I already tried using a simple parrarel for the chase and attack task, but it parrarel can only handle 2 task at once. Any solution for this?

Could it be that hasSeenPlayer get invalidated?

Also inside of your BTTasks are you overriding “Event Receive Execute AI” returning them with Finish Execute? (it needs to succeed or fail to get to the next task).

Upon success it should go to the next node or on failure restart the tree.

1 Like

Thanks for the reply. I’ll try it out later and I’ll tell if it works or not

well turns out I really only need to add the Finish execute event. Thanks for solution!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.