Help Repeating Tasks With Parallel Composite

skatesa207

New member
Hi,

I'm trying to run a simple loop where an enemy is constantly moving towards a player and every 3 seconds performs a jump; here is how my tree looks:

1607534946884.png

When I playtest it runs the first time like it should and performs the jump after waiting, but the second time it runs the logic gets stuck at the "Parallel" task after the wait, then waits another time before it performs the logic like it should; here is how the tree looks when it gets stuck in "Parallel" (checkmark on the "Parallel" and character does not perform jump):
1607535097029.png

And here is how the tree looks when it is repeating but actually performs the jump (the "Parallel box no longer has a check mark next to it and allows the logic to flow to allow the character to jump):
1607535133363.png

I guess I'm not understanding how to reset the "Parallel" task if it already returned success, or if I'm going about this wrong by restarting the whole behavior tree.

Thanks!
 

Justin

Administrator
Staff member
I generally try to avoid using the Restart Behavior Tree task within the behavior tree that you are restarting. For this situation you should be able to use a Repeater at the base of the tree with repeat forever enabled to prevent it from ending.
 
Top