BTForEach

Inherits: BTDecorator < BTTask < BT

BT decorator that executes its child task for each element of an Array.

Description

BTForEach executes its child task for each element of an Array. During each iteration, the next element is stored in the specified Blackboard variable.

Returns RUNNING if the child task results in RUNNING or if the child task results in SUCCESS on a non-last iteration.

Returns FAILURE if the child task results in FAILURE.

Returns SUCCESS if the child task results in SUCCESS on the last iteration.

Properties

StringName

array_var

&""

StringName

save_var

&""


Property Descriptions

StringName array_var = &""

  • void set_array_var ( StringName value )

  • StringName get_array_var ( )

A variable within the Blackboard that holds an Array, which is used for the iteration process.


StringName save_var = &""

  • void set_save_var ( StringName value )

  • StringName get_save_var ( )

A Blackboard variable used to store an element of the array referenced by array_var.