Hi,
Problem
PerformConditionCheck is not being called every tick even though it’s supposed to. Check Condition Only Black Board Changes is set to false. The decorator node in the tree is set to abort Both. PerformConditionCheck is overriden (it doesn’t matter if it’s PerformConditionCheck or PerformConditionCheckAI.
Ugly workaround
I investigated the issue and found out this piece (BTDecorator_BlueprintBase):
if (bIsOnActiveBranch)
{
bShouldAbort = (FlowAbortMode == EBTFlowAbortMode::Self || FlowAbortMode == EBTFlowAbortMode::Both) && CalculateRawConditionValueImpl(OwnerComp) == IsInversed();
}
else
{
bShouldAbort = (FlowAbortMode == EBTFlowAbortMode::LowerPriority || FlowAbortMode == EBTFlowAbortMode::Both) && CalculateRawConditionValueImpl(OwnerComp) != IsInversed();
}
And here, FlowAbortMode was still set to None! If you go to the Decorator blueprint and change the default value (doesn’t matter to what), it overrides correctly with the value set in the Behavior Tree. And PerformConditionCheck starts to be called every tick.
I provide the link to a simplest project to reproduce the issue.
- Play;
- Notice blue message from decorator is shown once;
- Stop. Open decorator blueprint;
- Change “Observer Aborts” from None to Lower Priority;
- Play;
- Notice that blue message is now all over the screen from the bottom to the top;
Please investigate or explain to me what am I doing wrong. I’d be glad to provide additional info if needed.