PerformConditionCheck decorator bug

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.

  1. Play;
  2. Notice blue message from decorator is shown once;
  3. Stop. Open decorator blueprint;
  4. Change “Observer Aborts” from None to Lower Priority;
  5. Play;
  6. 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.

Hey kirdaybov-

I opened the project you linked in the binary version of 4.12.3 and when I pressed play the first time the message “Decorator: Preform Check” was printing on tick. When I changed Observer Aborts from None to Lower Priority it continued to print out when I pressed play again.

Interesting. The engine I was using was built from source 4.12.2 in DebugGame Editor configuration. And the bug is stable. I’ll try 4.12.3 and let you know if it’s gone or not.

I opened the project with built from source 4.12.3 DebugGame Editor. The bug is gone. I guess it was fixed between 4.12.2 and 4.12.3. This topic can be closed.

Thank you for your time!