<623> BTState <624> A state node for LimboHSM that hosts a BehaviorTree. <625> BTState is a LimboState node that manages a BehaviorTree to provide behavior logic for the state. It instantiates and runs the BehaviorTree resource, dispatching a state machine event upon <4/> or <5/>. Event names are customizable through success_event and failure_event. For further details on state machine events, see LimboState.dispatch. <626> behavior_tree <627> failure_event <628> monitor_performance <629> success_event <630> get_bt_instance() <2/> <631> set_scene_root_hint(scene_root: <2/>) <632> BehaviorTree behavior_tree ๐Ÿ”— <633> A BehaviorTree resource that defines state behavior. <634> <1/> failure_event = <2/> ๐Ÿ”— <635> <1/> set_failure_event(value: <2/>) <636> <1/> get_failure_event() <637> HSM event that will be dispatched when the behavior tree results in <1/>. See LimboState.dispatch. <638> <1/> monitor_performance = <2/> ๐Ÿ”— <639> If <1/>, adds a performance monitor to โ€œDebugger->Monitorsโ€ for each instance of this BTState node. <640> <1/> success_event = <2/> ๐Ÿ”— <641> <1/> set_success_event(value: <2/>) <642> <1/> get_success_event() <643> HSM event that will be dispatched when the behavior tree results in <1/>. See LimboState.dispatch. <644> BTInstance get_bt_instance() <2/> ๐Ÿ”— <645> <1/> set_scene_root_hint(scene_root: <2/>) ๐Ÿ”— <646> Sets the <1/> that will be used as the scene root for the newly instantiated behavior tree. Should be called before the state machine is initialized. This is typically useful when creating BTState nodes dynamically from code. <647> Full class reference is available in the side bar. <648> BBAabb <649> Inherits: BBParam <650> AABB-type parameter for BehaviorTree tasks. See BBParam. <651> BBArray <652> Array-type parameter for BehaviorTree tasks. See BBParam. <653> BBBasis <654> Basis-type parameter for BehaviorTree tasks. See BBParam. <655> BBBool <656> Bool-type parameter for BehaviorTree tasks. See BBParam. <657> BBByteArray <658> ByteArray-type parameter for BehaviorTree tasks. See BBParam. <659> BBColor <660> Color-type parameter for BehaviorTree tasks. See BBParam. <661> BBColorArray <662> ColorArray-type parameter for BehaviorTree tasks. See BBParam. <663> BBDictionary <664> Dictionary-type parameter for BehaviorTree tasks. See BBParam. <665> BBFloat <666> Float-type parameter for BehaviorTree tasks. See BBParam. <667> BBFloat32Array <668> PackedFloat32Array-type parameter for BehaviorTree tasks. See BBParam. <669> BBFloat64Array <670> PackedFloat64Array-type parameter for BehaviorTree tasks. See BBParam. <671> BBInt <672> Integer-type parameter for BehaviorTree tasks. See BBParam. <673> BBInt32Array <674> PackedInt32Array-type parameter for BehaviorTree tasks. See BBParam. <675> BBInt64Array <676> PackedInt64Array-type parameter for BehaviorTree tasks. See BBParam. <677> BBNode <678> Node-type parameter for BehaviorTree tasks. See BBParam. <679> Node-type parameter intended for use with BehaviorTree tasks. See BBParam. <680> If the source is a blackboard variable, it allows any type extended from <1/>. <681> BBPlane <682> Plane-type parameter for BehaviorTree tasks. See BBParam. <683> BBProjection <684> Projection-type parameter for BehaviorTree tasks. See BBParam. <685> BBQuaternion <686> Quaternion-type parameter for BehaviorTree tasks. See BBParam. <687> BBRect2 <688> Rect2-type parameter for BehaviorTree tasks. See BBParam. <689> BBRect2i <690> Rect2i-type parameter for BehaviorTree tasks. See BBParam. <691> BBString <692> String-type parameter for BehaviorTree tasks. See BBParam. <693> BBStringArray <694> StringArray-type parameter for BehaviorTree tasks. See BBParam. <695> BBStringName <696> StringName-type parameter for BehaviorTree tasks. See BBParam. <697> BBTransform2D <698> Transform2D-type parameter for BehaviorTree tasks. See BBParam. <699> BBTransform3D <700> Transform3D-type parameter for BehaviorTree tasks. See BBParam. <701> BBVariant <702> Variant-type parameter for BehaviorTree tasks. See BBParam. <703> Variant-type parameter intended for use with BehaviorTree tasks. See BBParam. <704> The data type is specified by type. <705> type <706> Variant.Type type = <1/> ๐Ÿ”— <707> <1/> set_type(value: Variant.Type) <708> Variant.Type get_type() <709> Specified Variant.Type for the parameter value. <710> BBVector2 <711> Vector2-type parameter for BehaviorTree tasks. See BBParam. <712> BBVector2Array <713> Vector2Array-type parameter for BehaviorTree tasks. See BBParam. <714> BBVector2i <715> Vector2i-type parameter for BehaviorTree tasks. See BBParam. <716> BBVector3 <717> Vector3-type parameter for BehaviorTree tasks. See BBParam. <718> BBVector3Array <719> Vector3Array-type parameter for BehaviorTree tasks. See BBParam. <720> BBVector3i <721> Vector3i-type parameter for BehaviorTree tasks. See BBParam. <722> BBVector4 <723> Vector4-type parameter for BehaviorTree tasks. See BBParam. <724> BBVector4i <725> Vector4i-type parameter for BehaviorTree tasks. See BBParam. <726> BehaviorTree <727> Contains Behavior Tree data. <728> Behavior Trees are hierarchical structures used to model and control the behavior of agents in a game (e.g., characters, enemies, entities). They are designed to make it easier to create complex and highly modular behaviors for your games. <729> Behavior Trees are composed of tasks that represent specific actions or decision-making rules. Tasks can be broadly categorized into two main types: control tasks and leaf tasks. Control tasks determine the execution flow within the tree. They include BTSequence, BTSelector, and BTInvert. Leaf tasks represent specific actions to perform, like moving or attacking, or conditions that need to be checked. The BTTask class provides the foundation for various building blocks of the Behavior Trees. BT tasks can share data with the help of Blackboard. See BTTask.blackboard and Blackboard. <730> Note: To create your own actions, extend the BTAction class. <731> The BehaviorTree is executed from the root task and follows the rules specified by the control tasks, all the way down to the leaf tasks, which represent the actual actions that the agent should perform or conditions that should be checked. Each task returns a status when it is executed. It can be <1/>, <2/>, or <3/>. These statuses determine how the tree progresses. They are defined in Status. <732> Behavior Trees handle conditional logic using condition tasks. These tasks check for specific conditions and return either <1/> or <2/> based on the state of the agent or its environment (e.g., โ€œIsLowOnHealthโ€, โ€œIsTargetInSightโ€). Conditions can be used together with BTSequence and BTSelector to craft your decision-making logic. <733> Note: To create your own conditions, extend the BTCondition class. <734> Check out the BTTask class, which provides the foundation for various building blocks of Behavior Trees. <735> blackboard_plan <736> description <737> BehaviorTree <738> clone() <2/> <739> copy_other(other: BehaviorTree) <740> BTTask <741> get_root_task() <2/> <742> instantiate(agent: <2/>, blackboard: Blackboard, instance_owner: <4/>, custom_scene_root: <5/> = null) <6/> <743> set_root_task(task: BTTask) <744> plan_changed() ๐Ÿ”— <745> Emitted when the BlackboardPlan changes. <746> BlackboardPlan blackboard_plan ๐Ÿ”— <747> <1/> description = <2/> ๐Ÿ”— <748> <1/> set_description(value: <2/>) <749> <1/> get_description() <750> User-provided description of the BehaviorTree. <751> BehaviorTree clone() <2/> ๐Ÿ”— <752> Makes a copy of the BehaviorTree resource. <753> <1/> copy_other(other: BehaviorTree) ๐Ÿ”— <754> Become a copy of another behavior tree. <755> BTTask get_root_task() <2/> ๐Ÿ”— <756> Returns the root task of the BehaviorTree resource. <757> BTInstance instantiate(agent: <2/>, blackboard: Blackboard, instance_owner: <4/>, custom_scene_root: <5/> = null) <6/> ๐Ÿ”— <758> Instantiates the behavior tree and returns BTInstance. <2/> should be the scene node that will own the behavior tree instance. This is typically a BTPlayer, BTState, or a custom player node that controls the behavior tree execution. Make sure to pass a Blackboard with values populated from blackboard_plan. See also BlackboardPlan.populate_blackboard & BlackboardPlan.create_blackboard. <759> If <1/> is not <2/>, it will be used as the scene root for the newly instantiated behavior tree; otherwise, the scene root will be set to <3/>. Scene root is essential for BBNode instances to work properly. <760> <1/> set_root_task(task: BTTask) ๐Ÿ”— <761> Assigns a new root task to the BehaviorTree resource. <762> BehaviorTreeData <763> Represents current state of a BehaviorTree instance. <764> This class is used by the LimboAI debugger for the serialization and deserialization of BehaviorTree instance data. <765> Additionally, it can be used with BehaviorTreeView to visualize the current state of a BehaviorTree instance. It is meant to be utilized in custom in-game tools. <766> BehaviorTreeData <767> create_from_bt_instance(bt_instance: BTInstance) <3/> <768> BehaviorTreeData create_from_bt_instance(bt_instance: BTInstance) <3/> ๐Ÿ”— <769> Returns current state of the <1/> encoded as a BehaviorTreeData, suitable for use with BehaviorTreeView. <770> Behavior tree instance can be acquired with BTPlayer.get_bt_instance. <771> BehaviorTreeView <772> Visualizes the current state of a BehaviorTree instance. <773> Visualizes the current state of a BehaviorTree instance. See also BehaviorTreeData. <774> update_interval_msec <775> clear() <776> update_tree(behavior_tree_data: BehaviorTreeData) <777> task_selected(type_name: <1/>, script_path: <2/>) ๐Ÿ”— <778> Emitted when a task item is selected in BehaviorTreeView.