CBA_statemachine_fnc_addTransition

Description

Creates a transition between two states.

Parameters

_stateMachinea state machine <LOCATION>
_originalStatestate the transition origins from STRING
_targetStatestate the transition goes to STRING
_conditioncondition under which the transition will happen <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", {true}, {
    systemChat format [
        "%1 transitioned from %2 to %3 via %4.",
        _this, _thisOrigin, _thisTarget, _thisTransition
    ];
}, "dummyTransition"] call CBA_statemachine_fnc_addTransition;

Author

BaerMitUmlaut

string used by format
Close