limboai/doc_classes/BTState.xml

41 lines
2.3 KiB
XML
Raw Normal View History

2022-11-01 20:31:22 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTState" inherits="LimboState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2022-11-01 20:31:22 +00:00
<brief_description>
2022-11-04 12:27:09 +00:00
A state node for [LimboHSM] that hosts a [BehaviorTree].
2022-11-01 20:31:22 +00:00
</brief_description>
<description>
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 [code]SUCCESS[/code] or [code]FAILURE[/code]. Event names are customizable through [member success_event] and [member failure_event]. For further details on state machine events, see [method LimboState.dispatch].
2022-11-01 20:31:22 +00:00
</description>
<tutorials>
</tutorials>
<methods>
2024-08-03 11:14:31 +00:00
<method name="get_bt_instance" qualifiers="const">
<return type="BTInstance" />
<description>
2024-08-03 11:14:31 +00:00
Returns the behavior tree instance.
</description>
</method>
2024-08-05 11:21:57 +00:00
<method name="set_scene_root_hint">
<return type="void" />
<param index="0" name="scene_root" type="Node" />
<description>
Sets the [Node] 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.
</description>
</method>
</methods>
2022-11-01 20:31:22 +00:00
<members>
<member name="behavior_tree" type="BehaviorTree" setter="set_behavior_tree" getter="get_behavior_tree">
A [BehaviorTree] resource that defines state behavior.
2022-11-04 12:27:09 +00:00
</member>
2024-03-04 15:14:47 +00:00
<member name="failure_event" type="StringName" setter="set_failure_event" getter="get_failure_event" default="&amp;&quot;failure&quot;">
HSM event that will be dispatched when the behavior tree results in [code]FAILURE[/code]. See [method LimboState.dispatch].
2022-11-04 12:27:09 +00:00
</member>
<member name="monitor_performance" type="bool" setter="_set_monitor_performance" getter="_get_monitor_performance" default="false">
If [code]true[/code], adds a performance monitor to "Debugger-&gt;Monitors" for each instance of this [BTState] node.
</member>
2024-03-04 15:14:47 +00:00
<member name="success_event" type="StringName" setter="set_success_event" getter="get_success_event" default="&amp;&quot;success&quot;">
HSM event that will be dispatched when the behavior tree results in [code]SUCCESS[/code]. See [method LimboState.dispatch].
2022-11-01 20:31:22 +00:00
</member>
</members>
</class>