<460> A base class for LimboAI typed parameters. <461> A base class for LimboAI typed parameters, with the ability to reference a Blackboard variable or hold a raw value of a specific Variant.Type. <462> Note: Don’t instantiate. Use specific subtypes instead. <463> saved_value <464> ValueSource <465> value_source <466> variable <467> Variant.Type <468> get_type() <2/> <469> get_value(scene_root: <2/>, blackboard: Blackboard, default: <4/> = null) <470> enum ValueSource: πŸ”— <471> ValueSource SAVED_VALUE = <2/> <472> The value is stored directly within the BBParam resource. <473> ValueSource BLACKBOARD_VAR = <2/> <474> The value is referenced by a variable name and retrieved from the Blackboard. The variable name is stored within the BBParam resource. <475> <1/> saved_value = <2/> πŸ”— <476> <1/> set_saved_value(value: <2/>) <477> <1/> get_saved_value() <478> Stores the parameter value when value_source is set to SAVED_VALUE. The data type of the value is determined by get_type. <479> ValueSource value_source = <2/> πŸ”— <480> <1/> set_value_source(value: ValueSource) <481> ValueSource get_value_source() <482> Specifies the source of the value for BBParam. See ValueSource. <483> <1/> variable πŸ”— <484> <1/> set_variable(value: <2/>) <485> <1/> get_variable() <486> Stores the name of a Blackboard variable when value_source is set to BLACKBOARD_VAR. <487> Variant.Type get_type() <1/> πŸ”— <488> Returns the expected data type of the parameter. <489> <1/> get_value(scene_root: <2/>, blackboard: Blackboard, default: <4/> = null) πŸ”— <490> Returns the value of the parameter. <491> LimboState <492> Inherited By: BTState, LimboHSM <493> A state node for Hierarchical State Machines (HSM). <494> A LimboAI state node for Hierarchical State Machines (HSM). <495> You can create your state behavior by extending this class. To implement your state logic, you can override _enter, _exit, _setup, and _update. Alternatively, you can delegate state implementation to external methods using the <5/> methods. <496> For additional details on state machines, refer to LimboHSM. <497> EVENT_FINISHED <498> agent <499> blackboard <500> blackboard_plan <501> _enter() <2/> <502> _exit() <2/> <503> _setup() <2/> <504> _update(delta: <2/>) <3/> <505> add_event_handler(event: <2/>, handler: <3/>) <506> LimboState <507> call_on_enter(callable: <2/>) <508> call_on_exit(callable: <2/>) <509> call_on_update(callable: <2/>) <510> clear_guard() <511> dispatch(event: <2/>, cargo: <3/> = null) <512> get_root() <2/> <513> is_active() <2/> <514> named(name: <2/>) <515> set_guard(guard_callable: <2/>) <516> entered() πŸ”— <517> Emitted when the state is entered. <518> exited() πŸ”— <519> Emitted when the state is exited. <520> setup() πŸ”— <521> Emitted when the state is initialized. <522> updated(delta: <1/>) πŸ”— <523> Emitted when the state is updated. <524> <1/> EVENT_FINISHED πŸ”— <525> <1/> event_finished() <526> A commonly used event that indicates that the state has finished its work. <527> <1/> agent πŸ”— <528> An agent associated with the state, assigned during initialization. <529> Blackboard blackboard πŸ”— <530> A key/value data store shared by states within the state machine to which this state belongs. <531> BlackboardPlan blackboard_plan πŸ”— <532> <1/> _enter() <2/> πŸ”— <533> Called when the state is entered. <534> <1/> _exit() <2/> πŸ”— <535> Called when the state is exited. This happens on a transition to another state, and when the state machine is removed from the scene tree (e.g., when the node is freed with Node.queue_free or the scene changes). Due to implementation details, _exit will not be called on Object.free! <536> <1/> _setup() <2/> πŸ”— <537> Called once during initialization. Use this method to initialize your state. <538> <1/> _update(delta: <2/>) <3/> πŸ”— <539> Called during the update. Implement your state’s behavior with this method. <540> <1/> add_event_handler(event: <2/>, handler: <3/>) πŸ”— <541> Registers a <1/> to be called when <2/> is dispatched. The handler function should have the following signature: <542> If the handler returns <1/>, the event will be consumed. Cargo is an optional parameter that can be passed to the handler. See also dispatch. <543> LimboState call_on_enter(callable: <2/>) πŸ”— <544> A chained method that connects the entered signal to a <2/>. <545> LimboState call_on_exit(callable: <2/>) πŸ”— <546> A chained method that connects the exited signal to a <2/>. <547> LimboState call_on_update(callable: <2/>) πŸ”— <548> A chained method that connects the updated signal to a <2/>. <549> <1/> clear_guard() πŸ”— <550> Clears the guard function, removing the <1/> previously set by set_guard. <551> <1/> dispatch(event: <2/>, cargo: <3/> = null) πŸ”— <552> Recursively dispatches a state machine event named <1/> with an optional argument <2/>. Returns <3/> if the event was consumed. <553> 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 add_event_handler. <554> LimboState get_root() <2/> πŸ”— <555> Returns the root LimboState. <556> <1/> is_active() <2/> πŸ”— <557> Returns <1/> if it is currently active, meaning it is the active substate of the parent LimboHSM. <558> LimboState named(name: <2/>) πŸ”— <559> A chained method for setting the name of this state. <560> <1/> set_guard(guard_callable: <2/>) πŸ”— <561> Sets the guard function, which is a function called each time a transition to this state is considered. If the function returns <1/>, the transition will be disallowed. <562> LimboHSM <563> Inherits: LimboState <564> Event-based Hierarchical State Machine (HSM). <565> Event-based Hierarchical State Machine (HSM) that manages LimboState instances and facilitates transitions between them. LimboHSM is a LimboState in itself and can also serve as a child of another LimboHSM node. <566> LimboState <567> ANYSTATE <568> initial_state <569> UpdateMode <570> update_mode <571> add_transition(from_state: LimboState, to_state: LimboState, event: <4/>, guard: <5/> = Callable()) <572> change_active_state(state: LimboState) <573> get_active_state() <2/> <574> get_leaf_state() <2/> <575> get_previous_active_state() <2/> <576> has_transition(from_state: LimboState, event: <3/>) <4/> <577> initialize(agent: <2/>, parent_scope: Blackboard = null) <578> remove_transition(from_state: LimboState, event: <3/>) <579> set_active(active: <2/>) <580> update(delta: <2/>) <581> active_state_changed(current: LimboState, previous: LimboState) πŸ”— <582> Emitted when the currently active substate is switched to a different substate. <583> enum UpdateMode: πŸ”— <584> UpdateMode IDLE = <2/> <585> Update the state machine during the idle process. <586> UpdateMode PHYSICS = <2/> <587> Update the state machine during the physics process. <588> UpdateMode MANUAL = <2/> <589> Manually update the state machine by calling update from a script. <590> LimboState ANYSTATE πŸ”— <591> LimboState anystate() <592> Useful for defining a transition from any state. <593> LimboState initial_state πŸ”— <594> <1/> set_initial_state(value: LimboState) <595> LimboState get_initial_state() <596> The substate that becomes active when the state machine is activated using the set_active method. If not explicitly set, the first child of the LimboHSM will be considered the initial state. <597> UpdateMode update_mode = <2/> πŸ”— <598> <1/> set_update_mode(value: UpdateMode) <599> UpdateMode get_update_mode() <600> Specifies when the state machine should be updated. See UpdateMode. <601> <1/> add_transition(from_state: LimboState, to_state: LimboState, event: <4/>, guard: <5/> = Callable()) πŸ”— <602> Establishes a transition from one state to another when <1/> is dispatched. Both <2/> and <3/> must be immediate children of this LimboHSM. <603> Optionally, a <1/> function can be specified, which must return a boolean value. If the guard function returns <2/>, the transition will not occur. The guard function is called immediately before the transition is considered. For a state-wide guard function, check out LimboState.set_guard. <604> <1/> change_active_state(state: LimboState) πŸ”— <605> Changes the currently active substate to <1/>. If <2/> is already active, it will be exited and reentered. <606> <1/> must be a child of this LimboHSM. <607> LimboState get_active_state() <2/> πŸ”— <608> Returns the currently active substate. <609> LimboState get_leaf_state() <2/> πŸ”— <610> Returns the currently active leaf state within the state machine. <611> LimboState get_previous_active_state() <2/> πŸ”— <612> Returns the previously active substate. <613> <1/> has_transition(from_state: LimboState, event: <3/>) <4/> πŸ”— <614> Returns <1/> if there is a transition from <2/> for a given <3/>. <615> <1/> initialize(agent: <2/>, parent_scope: Blackboard = null) πŸ”— <616> Initiates the state and calls LimboState._setup for both itself and all substates. <617> <1/> remove_transition(from_state: LimboState, event: <3/>) πŸ”— <618> Removes a transition from a state associated with specific <1/>. <619> <1/> set_active(active: <2/>) πŸ”— <620> When set to <1/>, switches the state to initial_state and activates state processing according to update_mode. <621> <1/> update(delta: <2/>) πŸ”— <622> Calls LimboState._update on itself and the active substate, with the call cascading down to the leaf state. This method is automatically triggered if update_mode is not set to MANUAL.