A state node for Hierarchical State Machines (HSM).
A LimboAI state node for Hierarchical State Machines (HSM).
You can create your state behavior by extending this class. To implement your state logic, you can override [method _enter], [method _exit], [method _setup], and [method _update]. Alternatively, you can delegate state implementation to external methods using the [code]call_on_*[/code] methods.
For additional details on state machines, refer to [LimboHSM].
Called when the state is entered.
Called when the state is exited.
Called once during initialization. Use this method to initialize your state.
Called during the update. Implement your state's behavior with this method.
Registers a [param p_handler] to be called when [param p_event] is dispatched.
A chained method that connects the [signal entered] signal to a [param p_callable].
A chained method that connects the [signal exited] signal to a [param p_callable].
A chained method that connects the [signal updated] signal to a [param p_callable].
Clears the guard function, removing the [Callable] previously set by [method set_guard].
Recursively dispatches a state machine event named [param p_event] with an optional argument [param p_cargo]. Returns [code]true[/code] if the event was consumed.
Events propagate from the leaf state to the root state, and propagation stops as soon as any state consumes the event. States will consume the event if they have a related transition or event handler. For more information on event handlers, see [method add_event_handler].
Returns the root [LimboState].
Returns [code]true[/code] if it is currently active, meaning it is the active substate of the parent [LimboHSM].
A chained method for setting the name of this state.
Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns [code]false[/code], the transition will be disallowed.
A commonly used event that indicates that the state has finished its work.
An agent associated with the state, assigned during initialization.
A key/value data store shared by states within the state machine to which this state belongs.
Stores and manages variables that will be used in constructing new [Blackboard] instances.
Emitted when the state is entered.
Emitted when the state is exited.
Emitted when the state is initialized.
Emitted when the state is updated.