-
-
Notifications
You must be signed in to change notification settings - Fork 0
Sequencer
Sam Orme edited this page Feb 20, 2022
·
5 revisions
The Sequencer is a composite node. It will execute each child in sequence, returning failure if a child fails, and returning success if every child returned a successful status.
Simple example of a patrolling NPC sequence
.Sequence("Sequence")
.Do("Select random waypoint", () => {
...
return NodeResult.Success;
})
.Do("Go to waypoint", () => {
...
return arrived ? NodeResult.Success : NodeResult.Running;
})
.Wait("Random pause", 1, 5)
.End()
resetIfInterrupted - boolean indicating if the sequence should start again if it gets interrupted.
abortType - see Composite
condition - see Composite