Reply To: What's wrong with my AI agent's Behavior Tree?

NodeCanvas Forums Support What's wrong with my AI agent's Behavior Tree? Reply To: What's wrong with my AI agent's Behavior Tree?

#15896
Gavalakis
Keymaster

Hello again,

The Selector executes its child nodes in order from highest to lowest priority (left to right). It will return Success as soon as any child returns Success. It will return Failure if all children return in Failure.
This means that when a child node return Success (as in your example) the rest of the child nodes will not execute.

If you want to execute all child nodes you will probably need to use a “Sequencer” node, which is kind of the reverse of a “Selector”.
The Sequencer executes its child nodes in order from highest to lowest priority (left to right). It will return Failure as soon as any child returns Failure. It will return Success if all children return Success.

Please let me know if that works for you.
Thanks!

Join us on Discord: https://discord.gg/97q2Rjh