.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/LimboHSM.xml.
.._class_LimboHSM:
LimboHSM
========
**Inherits:**:ref:`LimboState<class_LimboState>`
Event-based Hierarchical State Machine (HSM).
..rst-class:: classref-introduction-group
Description
-----------
Event-based Hierarchical State Machine (HSM) that manages :ref:`LimboState<class_LimboState>` instances and facilitates transitions between them. LimboHSM is a :ref:`LimboState<class_LimboState>` in itself and can also serve as a child of another LimboHSM node.
The substate that becomes active when the state machine is activated using the :ref:`set_active<class_LimboHSM_method_set_active>` method. If not explicitly set, the first child of the LimboHSM will be considered the initial state.
Establishes a transition from one state to another when ``p_event`` is dispatched. Both ``p_from_state`` and ``p_to_state`` must be immediate children of this state.
Initiates the state and calls :ref:`LimboState._setup<class_LimboState_private_method__setup>` for both itself and all substates.
..rst-class:: classref-item-separator
----
.._class_LimboHSM_method_set_active:
..rst-class:: classref-method
void **set_active****(** bool p_active **)**
When set to ``true``, switches the state to :ref:`initial_state<class_LimboHSM_property_initial_state>` and activates state processing according to :ref:`update_mode<class_LimboHSM_property_update_mode>`.
..rst-class:: classref-item-separator
----
.._class_LimboHSM_method_update:
..rst-class:: classref-method
void **update****(** float p_delta **)**
Calls :ref:`LimboState._update<class_LimboState_private_method__update>` on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if :ref:`update_mode<class_LimboHSM_property_update_mode>` is not set to :ref:`MANUAL<class_LimboHSM_constant_MANUAL>`.
..|virtual|replace:::abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
..|const|replace:::abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
..|vararg|replace:::abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
..|constructor|replace:::abbr:`constructor (This method is used to construct a type.)`
..|static|replace:::abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
..|operator|replace:::abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
..|bitfield|replace:::abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`