CBA_statemachine_fnc_addEventTransition

Description

Creates a transition between two states.

Parameters

_stateMachinea state machine <LOCATION>
_originalStatestate the transition origins from STRING
_targetStatestate the transition goes to STRING
_eventslist of events that can trigger the transition ARRAY
_conditionadditional condition required for the transition to trigger <CODE>
_onTransitioncode that gets executed once transition happens <CODE> (Default: {})
_namename for this specific transition STRING (Default: “NONAME”)

Returns

_wasCreatedcheck if the transition was created <BOOL>

Examples

[_stateMachine, "initial", "end", ["end_statemachine"], {true}, {
    systemChat format [
        "%1 transitioned from %2 to %3 via %4.",
        _this, _thisOrigin, _thisTarget, _thisTransition
    ];
}, "dummyTransition"] call CBA_statemachine_fnc_addEventTransition;

Author

BaerMitUmlaut

string used by format
Array to read from [Array]
Close