-
-
Notifications
You must be signed in to change notification settings - Fork 0
Selector
Sam Orme edited this page Feb 20, 2022
·
2 revisions
The Selector is a composite node and acts as an OR gate. It will execute each child in order, if the child returns success, the selector will return Success. If the child returns failure, the next child will be executed on the next update.
Simple example of a door selector
.Selector("Selector")
.Do("Open door", () => {
...
return isLocked ? NodeResult.Failure : NodeResult.Success;
})
.Do("Break door", () => {
...
return NodeResult.Success;
})
.End()
abortType - see Composite
condition - see Composite