BTDynamicSequence
Inherits: BTComposite < BTTask < BT
BT composite that executes tasks from scratch every tick as long as they return SUCCESS
.
Description
BTDynamicSequence executes its child tasks sequentially, from first to last, for as long as they return SUCCESS
. Unlike BTSequence, it will execute tasks from the beginning every tick, reevaluating their statuses. It is quite useful when you want to recheck conditions preceding a long-running action during each tick and abort the RUNNING
action when any condition results in FAILURE
.
Returns RUNNING
if a child task results in RUNNING
. BTDynamicSequence 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 SUCCESS
, it will abort the remembered RUNNING
task.
Returns FAILURE
if a child task results in FAILURE
.
Returns SUCCESS
if all child tasks result in SUCCESS
.