Issue with Conditional Abort

psdavis

New member
Hello,

This may be an issue with my understanding of Conditional Aborts, but I have a tree where a certain conditional is failing but never seems to be re-evaluated despite the Conditional Abort being set.

Minion-BehaviourTree.PNG
The Condition that is not behaving as I expect is the the Can See Object in the left-most branch.
What I'm expecting is that when this agent is spawned, a variable for the Left-branch's Seek task is set and that task executed but if Can See Object is triggered, it will set its own variable which is then copied by the Set Shared Game Object in that Sequence. However, the Can See Object is never reevaluated once it returns false on the first tick. If the target object is in range on the first tick, then the condition returns true, so there's no issue with the settings on the node.

The rest of the tree is working as I want; once Seek returns true it continues to the Right branch and eventually reaches through to the BT Reference node which is the agent's attack sequence. However, what I need to have happen is this agent essentially "update" its target if another one gets into range.

I tried a different setup without the Parallel Selector, and the issue remains.

Any help you can give me here would be greatly appreciated.
 
A conditional abort on a parallel selector doesn't make much sense sense the parallel selector is already reevaluating. Also, you have a self abort and then a lower priority abort so the self abort won't nest anyway. The parallel selector is only used in a very specific use case so I recommend removing that. Your top sequence task also has a self abort which doesn't have any conditional tasks that it'll nest with.
 
Thanks for the quick reply. I think I've got it fixed.
I was probably over-thinking it. The parallel selector came from a guideline (can't really call it a tutorial) that I found online.
But it was never working with the Parallel Selector so that's when I tried adding the aborts.
I changed it to a regular Selector, and made that child-Sequence Lower Priority and it's working as expected.
I'll need to do some more adjustments to the right-side branch but this should help me work through that.

Appreciate the support!
 
Last edited:
Top