BTRandomSelector
Inherits: BTComposite < BTTask < BT
BT composite that executes tasks in random order until first SUCCESS
.
Description
BTRandomSelector executes its child tasks in a random order until any child returns SUCCESS
. If a child task results in FAILURE
, BTRandomSelector will immediately execute another child task until one of them returns SUCCESS
or all of them result in FAILURE
.
Returns RUNNING
if a child task results in RUNNING
. BTRandomSelector 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 all child tasks result in FAILURE
.
Returns SUCCESS
if a child task results in SUCCESS
.