Skip to content

Commit

Permalink
Merge pull request #1213 from PiZZAD0X/statemachineDefaultTargetState
Browse files Browse the repository at this point in the history
Default transition targetstate to transition configName
  • Loading branch information
commy2 committed Aug 21, 2019
2 parents 96eab72 + 89cfeeb commit 1ccbafa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/statemachine/fnc_createFromConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ private _stateMachine = [_list, _skipNull] call FUNC(create);
private _state = configName _x;
{
private _transition = configName _x;
private _targetState = getText (_x >> "targetState");
private _targetState = _transition;
if (isText (_x >> "targetState")) then {
_targetState = getText (_x >> "targetState");
};
GET_FUNCTION(_condition,_x >> "condition");
GET_FUNCTION(_onTransition,_x >> "onTransition");
private _events = getArray (_x >> "events");
Expand Down

0 comments on commit 1ccbafa

Please sign in to comment.