Try children until one succeeds

The Selector is a common Composite task that is similar to an "or" operation. It will return success as soon as one of its child tasks return success. If a child task returns failure then it will sequentially run the next child task. If no child task returns success then it will return failure.

The first Selector child has failed and the second child has succeeded.

In this example the first Return Status task returned failure. Because of the failure the Selector moved onto the next child, which returned success. Because a child returned success the Selector stopped traversing and returned a status of success.

Stop at the first Success

The first Selector child succeeds, so the remaining children stay inactive.

In this example the first child task returned success so there was no need for the Selector to run the second of third tasks.

Fail after every child fails

Every Selector child and the Selector itself have finished with Failure.

With this last example the Selector traversed every child task but no child returned success. Because of this the Selector returned a status of failure.

Used in common behaviors