Behavior tree bypassing evaluated condition?

My behavior tree seems to be partially bypassing a blackboard condition.

In the screenshot I’ve attached, you can see the “Enemy set?” decorator evaluates to false (shown with the red mark next to the node), but the “Not close enough to enemy?” decorator below it is still being evaluated. In addition, it seems like the “Noise location set?” decorator isn’t evaluating to false (lack of a red mark), but it isn’t executing any of it’s leaf taks anyway. Meanwhile, the behavior tree is actually executing a totally different path on the right side. The decorators are set to notify observer on result change and abort both. The “Not close enough to enemy?” decorator only stops evaluating once the “Move To” task on the bottom right is finished.

I know the “Not close enough to enemy” decorator is running because the log prints a bunch of errors due to it trying to get an actor out of the “Enemy” blackboard value which is set to None. It’s not a huge issue, since I can just check if the actor is valid in the implementation of the decorator, but I’d rather not have to…

I’m using the perception system to change the blackboard values. When the enemy gets out of visual range, I null out the “enemy” blackboard value with Blackboard->SetValueAsObject(“Enemy”, NULL). Is this causing the issue? Maybe the nodes aren’t notified of the change or maybe they’re just not aborting? What’s the recommended way to have the perception system affect the behavior tree?

Guess I didn’t fully understand how the “observer aborts” works. Turns out if you set a decorator to “observer aborts lower” or “observer aborts both”, the decorator will always get evaluated when lower priority nodes are being executed, even if that decorator is not in the current path being executed. I had my “Not close enough to enemy?” decorator aborting both, which was the problem. Setting it to abort none fixed the issue. I didn’t need it to abort anything in the first place, since the “enemy set?” decorator above it already aborted both.

The thin yellow boxes around the decorator during debug shows that a decorator is being checked if it needs to abort any of the lower priority branches. Hope this helps anyone else learning how to use the behavior tree!