BTRandomSequence
Inherits: BTComposite < BTTask < BT
BT composite that executes tasks in random order as long as they return SUCCESS
.
Description
BTRandomSequence executes its child tasks in a random order as long as they return SUCCESS
. If a child task results in SUCCESS
, BTRandomSequence will immediately execute the next child task until one of them returns FAILURE
or all of them result in SUCCESS
.
Returns RUNNING
if a child task results in RUNNING
. BTRandomSequence will remember the execution order and the last child task that returned RUNNING
, ensuring it resumes from that point in the next tick.
Returns FAILURE
if a child task results in FAILURE
.
Returns SUCCESS
if all child tasks result in SUCCESS
.