Conditional Branch only working once

bbjones

Member
I have a tree that goes from left to right 2 sequences (lower priority) then a default with wander.
The leftmost sequence/conditional works correctly the first time it becomes true. But after that, if the tree ever ends up back on the right most default/wander sequence, the left conditional sequences never fire again even thought the conditionals triggering them do return true (I've traced this in code, the tasks do return success).

This shows the state of the BT when it no longer works. At this point the circled conditional task is returning success on every update, but the tree stays stuck on the rightmost sequence.
Note that when this BT starts, it starts on the rightmost default/wander sequence since both of the left conditionals return failure, and then goes through several back and forth of the left sequences just fine, until it hits the right default/wander again and then it's stuck.

1670002393051.png

Resetting the BT component on the AI does fix the tree, this is what is looks like after resetting to fix it being stuck:
1670002922021.png
 
Last edited:
Conditional aborts trigger when going from failure to success or success to failure. It looks like your task returned success and keeps returning success so the abort will not trigger again.
 
Ah yes, found a scenario where a secondary condition wasn't failing the task. Thanks!

Is that what the 2 different return success icons indicate? Or what is the difference between the green check mark with a circle in the first image compared to just a green check mark in the second?
 
Is that what the 2 different return success icons indicate? Or what is the difference between the green check mark with a circle in the first image compared to just a green check mark in the second?
The circle around indicates that the task is being reevaluated. You have a lower priority abort so it won't reevaluate when the current branch is active.
 
Top