BTDynamicSelector
Inherits: BTComposite < BTTask < BT
BT composite that executes tasks from scratch every tick until first SUCCESS
.
Description
BTDynamicSelector executes its child tasks sequentially, from first to last, until any child returns SUCCESS
. Unlike BTSelector, it will execute tasks from the beginning every tick, reevaluating their statuses. It is quite useful when you want to retry higher-priority behaviors in every tick.
Returns RUNNING
if a child task results in RUNNING
. BTDynamicSelector will remember the last RUNNING
child, but, unlike BTSequence, on the next execution tick, it will reexecute preceding tasks and reevaluate their return statuses. If any of the preceding tasks doesn’t result in FAILURE
, it will abort the remembered RUNNING
task.
Returns FAILURE
if all child tasks result in FAILURE
.
Returns SUCCESS
if a child task results in SUCCESS
.