Hello everyone,
I have a selector with three sequence children, and each sequence has a decorator that checks whether an enum value in the Blackboard changes. When the value changes, the decorator should abort the current task. Each sequence contains a subtree that performs the corresponding behavior.
The issue is with the investigating state. Inside its subtree, I have a custom task called MoveToLocation that moves the AI to a specific location using the MoveToLocationOrActor node. In ReceiveExecuteAI event, I call the movement function and subscribe to the async task’s OnMoveFinished event. I call FinishExecute(true) when the movement succeeds, and FinishExecute(false) for any other result.
In ReceiveAbortAI event, I end the movement task, and call FinishExecute(false). However, when the Blackboard enum changes, the task is not aborted correctly if the logic is inside a subtree. If I place all the nodes directly in the main behavior tree instead, everything works as expected.
Blueprint code:
Is this a bug or am I missing something?
Thanks



