Adds a state to a state machine.
_stateMachine | a state machine <LOCATION> |
_onState | code that is executed when state is active (frequency depends on amount of objects active in state machine) <CODE> (Default: {}) |
_onStateEntered | code that is executed once when state was entered, after onTransition (also once for the intial state) <CODE> (Default: {}) |
_onStateLeaving | code that is executed once when exiting state, before onTransition <CODE> (Default: {}) |
_name | unique state name STRING (Default: “stateX” with X being a unique number) |
_name | unique state name or empty string on error STRING |
_name = [_stateMachine, {}] call CBA_statemachine_fnc_addState;
BaerMitUmlaut