Feature Request: Compound Conditional

snarlynarwhal

New member
Hi, I encountered a problem and am not sure how to solve it. I think adding a compound conditional node would solve my problem, but there might be a better way I am not aware of.

I want the behavior tree to abort the "Attack Target" node once all three of the conditionals circled in red return true, not just the first one. Also, do inverters count as conditionals? I was not sure if the "Has Target" node gets considered in regards to conditional aborts since it is decorated by the inverter node.

Anyways, I was thinking that if the conditional abort aborts based on a single conditional, a compound conditional that functioned like a single conditional would solve my problem. I attempted to implement this myself, but ran into issues since it cannot inhered from both the ParentTask and Conditional classes.

Also, I did try using a sequencer, but it still seemed to abort on the first conditional.

1613006724340.png
 

snarlynarwhal

New member
Ah, using a sequencer with an abort type of both seems to produce the behavior I want. It might help to mention this in the documentation. I noticed it covers a nested selector, but not a nested sequencer (although I guess it is a given hah).
 
Last edited:

Justin

Administrator
Staff member
Nesting the composites will allow either of the aborts to trigger. In version 2 the nodes can be stacked so conditional aborts will be triggered based on any conditional task within that stacked nodes (in theory.. I haven't gotten to aborts yet :) )
 
Top