Lower Priority tree doesn't execute after switching to a right node

ASerg3v

New member
Hello everyone,

I have a strange issue with an execution order in the BT for my warrior.

When the warrior sees an enemy then a left tree is executed and the warrior follows and attacks the enemy however if the enemy was lost (too far from the warrior to attack) then the attack tree will be interrupted and the whole tree will be switched to the right one (moving to a defending position).

The main issue is that when the enemy was lost and the warrior can see it again, the behavior designer (BD) doesn't switch to the left tree (attack) until the right one (moving to a defending position) will be finished.

As I understand if I have a node with a lower priority mark (attack) then when BD executes a right node (moving to a defending position) the right node should be interrupted immediately and the left one should be started.

Please, see an example below.

Screenshot 2021-06-07 at 14.23.20.png
 
Hopefully, I've found a solution. Here is what I've got using the developer's comment from another post:

"Conditional aborts trigger when the conditional task changes the TaskStatus. This means that it can trigger from success to failure or failure to success. Since Conditional2 continues to return failure the conditional abort never occurs. The top sequence task returns failure because of Conditional2 and the idle continues to play."
Link: https://opsive.com/forum/index.php?threads/evaluation-logic-question.5218/

My solution:

1623070220863.png
 
Top