<322> <1/> is_root() <2/> ๐Ÿ”— <323> Returns <1/> if this task is the root task of its behavior tree. A behavior tree can have only one root task. <324> BTTask next_sibling() <2/> ๐Ÿ”— <325> Returns the next task after this task in the parentโ€™s children list. <326> Returns <1/> if this task has no parent or it is the last child in the parentโ€™s children list. <327> <1/> print_tree(initial_tabs: <2/> = 0) ๐Ÿ”— <328> Prints the subtree that starts with this task to the console. <329> <1/> remove_child(task: BTTask) ๐Ÿ”— <330> Removes <1/> from children. <331> <1/> remove_child_at_index(idx: <2/>) ๐Ÿ”— <332> Removes a child task at a specified index from children. <333> BTPlayer <334> Inherits: <335> Player of BehaviorTree resources. <336> BTPlayer node is used to instantiate and play BehaviorTree resources at runtime. During initialization, the behavior tree instance is given references to the agent, the blackboard, and the current scene root. The agent can be specified by the agent_node property (defaults to the BTPlayerโ€™s parent node). <337> For an introduction to behavior trees, see BehaviorTree. <338> active <339> agent_node <340> behavior_tree <341> blackboard <342> BlackboardPlan <343> blackboard_plan <344> monitor_performance <345> UpdateMode <346> update_mode <347> BTInstance <348> get_bt_instance() <349> restart() <350> set_bt_instance(bt_instance: BTInstance) <351> set_scene_root_hint(scene_root: <2/>) <352> update(delta: <2/>) <353> Signals <354> behavior_tree_finished(status: <1/>) ๐Ÿ”— <355> Deprecated: Use updated signal instead. <356> Emitted when the behavior tree has finished executing and returned <1/> or <2/>. <357> Argument <1/> holds the status returned by the behavior tree. See Status. <358> updated(status: <1/>) ๐Ÿ”— <359> Emitted when BTPlayer has finished the behavior tree update. <360> Enumerations <361> enum UpdateMode: ๐Ÿ”— <362> UpdateMode IDLE = <2/> <363> Execute behavior tree during the idle process. <364> UpdateMode PHYSICS = <2/> <365> Execute behavior tree during the physics process. <366> UpdateMode MANUAL = <2/> <367> Behavior tree is executed manually by calling update. <368> <1/> active = <2/> ๐Ÿ”— <369> <1/> set_active(value: <2/>) <370> <1/> get_active() <371> If <1/>, the behavior tree will be executed during update. <372> <1/> agent_node = <2/> ๐Ÿ”— <373> <1/> set_agent_node(value: <2/>) <374> <1/> get_agent_node() <375> Path to the node that will be used as the agent. Setting it after instantiation will have no effect. <376> BehaviorTree behavior_tree ๐Ÿ”— <377> <1/> set_behavior_tree(value: BehaviorTree) <378> BehaviorTree get_behavior_tree() <379> BehaviorTree resource to instantiate and execute at runtime. <380> Blackboard blackboard ๐Ÿ”— <381> <1/> set_blackboard(value: Blackboard) <382> Holds data shared by the behavior tree tasks. See Blackboard. <383> BlackboardPlan blackboard_plan ๐Ÿ”— <384> <1/> set_blackboard_plan(value: BlackboardPlan) <385> BlackboardPlan get_blackboard_plan() <386> Stores and manages variables that will be used in constructing new Blackboard instances. <387> <1/> monitor_performance = <2/> ๐Ÿ”— <388> <1/> set_monitor_performance(value: <2/>) <389> <1/> get_monitor_performance() <390> If <1/>, adds a performance monitor to โ€œDebugger->Monitorsโ€ for each instance of this BTPlayer node. <391> UpdateMode update_mode = <2/> ๐Ÿ”— <392> <1/> set_update_mode(value: UpdateMode) <393> UpdateMode get_update_mode() <394> Determines when the behavior tree is executed. See UpdateMode. <395> BTInstance get_bt_instance() ๐Ÿ”— <396> Returns the behavior tree instance. <397> <1/> restart() ๐Ÿ”— <398> Resets the behavior treeโ€™s execution. Each running task will be aborted and the next tree execution will start anew. This method does not reset Blackboard. <399> <1/> set_bt_instance(bt_instance: BTInstance) ๐Ÿ”— <400> Sets the BTInstance to play. This method is useful when you want to switch to a different behavior tree instance at runtime. See also BehaviorTree.instantiate. <401> <1/> set_scene_root_hint(scene_root: <2/>) ๐Ÿ”— <402> Sets the <1/> that will be used as the scene root for the newly instantiated behavior tree. Should be called before the BTPlayer is added to the scene tree (before <2/>). This is typically useful when creating BTPlayer nodes dynamically from code. <403> <1/> update(delta: <2/>) ๐Ÿ”— <404> Executes the root task of the behavior tree instance if active is <2/>. Call this method when update_mode is set to MANUAL. When update_mode is not MANUAL, the update will be called automatically. See UpdateMode. <405> Blackboard <406> A key/value storage for sharing among LimboHSM states and BehaviorTree tasks. <407> Blackboard is where data is stored and shared between states in the LimboHSM system and tasks in a BehaviorTree. Each state and task in the BehaviorTree can access this Blackboard, allowing them to read and write data. This makes it easy to share information between different actions and behaviors. <408> Blackboard can also act as a parent scope for another Blackboard. If a specific variable is not found in the active scope, it looks in the parent Blackboard to find it. A parent Blackboard can itself have its own parent scope, forming what we call a โ€œblackboard scope chain.โ€ Importantly, there is no limit to how many Blackboards can be in this chain, and the Blackboard doesnโ€™t modify values in the parent scopes. <409> New scopes can be created using the BTNewScope and BTSubtree decorators. Additionally, a new scope is automatically created for any LimboState that has defined non-empty Blackboard data or for any root-level LimboHSM node. <410> bind_var_to_property(var_name: <2/>, object: <3/>, property: <4/>, create: <5/> = false) <411> clear() <412> erase_var(var_name: <2/>) <413> Blackboard <414> get_parent() <2/> <415> get_var(var_name: <2/>, default: <3/> = null, complain: <4/> = true) <5/> <416> get_vars_as_dict() <2/> <417> has_var(var_name: <2/>) <3/> <418> link_var(var_name: <2/>, target_blackboard: Blackboard, target_var: <4/>, create: <5/> = false) <419> Array[<1/>] <420> list_vars() <2/> <421> populate_from_dict(dictionary: <2/>) <422> print_state() <2/> <423> set_parent(blackboard: Blackboard) <424> set_var(var_name: <2/>, value: <3/>) <425> top() <2/> <426> unbind_var(var_name: <2/>) <427> <1/> bind_var_to_property(var_name: <2/>, object: <3/>, property: <4/>, create: <5/> = false) ๐Ÿ”— <428> Establish a binding between a variable and the objectโ€™s property specified by <1/> and <2/>. Changes to the variable update the property, and vice versa. If <3/> is <4/>, the variable will be created if it doesnโ€™t exist. <429> <1/> clear() ๐Ÿ”— <430> Removes all variables from the Blackboard. Parent scopes are not affected. <431> <1/> erase_var(var_name: <2/>) ๐Ÿ”— <432> Removes a variable by its name. <433> Blackboard get_parent() <2/> ๐Ÿ”— <434> Returns a Blackboard that serves as the parent scope for this instance. <435> <1/> get_var(var_name: <2/>, default: <3/> = null, complain: <4/> = true) <5/> ๐Ÿ”— <436> Returns variable value or <1/> if variable doesnโ€™t exist. If <2/> is <3/>, an error will be printed if variable doesnโ€™t exist. If the variable doesnโ€™t exist in the current Blackboard scope, it will look in the parent scope Blackboard to find it. <437> <1/> get_vars_as_dict() <2/> ๐Ÿ”— <438> Returns all variables in the Blackboard as a dictionary. Keys are the variable names, values are the variable values. Parent scopes are not included. <439> <1/> has_var(var_name: <2/>) <3/> ๐Ÿ”— <440> Returns <1/> if the Blackboard contains the <2/> variable, including the parent scopes. <441> <1/> link_var(var_name: <2/>, target_blackboard: Blackboard, target_var: <4/>, create: <5/> = false) ๐Ÿ”— <442> Links a variable to another Blackboard variable. If a variable is linked to another variable, their state will always be identical, and any change to one will be reflected in the other. If <1/> is <2/>, the variable will be created if it doesnโ€™t exist. <443> You can use this method to link a variable in the current scope to a variable in another scope, or in another Blackboard instance. A variable can only be linked to one other variable. Calling this method again will overwrite the previous link. However, it is possible to link to the same variable from multiple different variables. <444> Array[<1/>] list_vars() <2/> ๐Ÿ”— <445> Returns all variable names in the Blackboard. Parent scopes are not included. <446> <1/> populate_from_dict(dictionary: <2/>) ๐Ÿ”— <447> Fills the Blackboard with multiple variables from a dictionary. The dictionary keys must be variable names and the dictionary values must be variable values. Keys must be StringName or String. <448> <1/> print_state() <2/> ๐Ÿ”— <449> Prints the values of all variables in each scope. <450> <1/> set_parent(blackboard: Blackboard) ๐Ÿ”— <451> Assigns the parent scope. If a value isnโ€™t in the current Blackboard scope, it will look in the parent scope Blackboard to find it. <452> <1/> set_var(var_name: <2/>, value: <3/>) ๐Ÿ”— <453> Assigns a value to a variable in the current Blackboard scope. If the variable doesnโ€™t exist, it will be created. If the variable already exists in the parent scope, the parent scope value will NOT be changed. <454> Blackboard top() <2/> ๐Ÿ”— <455> Returns the topmost Blackboard in the scope chain. <456> <1/> unbind_var(var_name: <2/>) ๐Ÿ”— <457> Remove binding from a variable. <458> BBParam <459> Inherited By: BBAabb, BBArray, BBBasis, BBBool, BBByteArray, BBColor, BBColorArray, BBDictionary, BBFloat, BBFloat32Array, BBFloat64Array, BBInt, BBInt32Array, BBInt64Array, BBNode, BBPlane, BBProjection, BBQuaternion, BBRect2, BBRect2i, BBString, BBStringArray, BBStringName, BBTransform2D, BBTransform3D, BBVariant, BBVector2, BBVector2Array, BBVector2i, BBVector3, BBVector3Array, BBVector3i, BBVector4, BBVector4i