Skip to content

Commit

Permalink
Same nil check for down civ car event
Browse files Browse the repository at this point in the history
  • Loading branch information
theace0296 committed Dec 30, 2021
1 parent 9532776 commit 8df1631
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions RandFramework/Server/objectives/fn_setDownCivCarEvent.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ if (count _nearestRoads > 0) then {
//[str(_backOfVehArea)] call TRGM_GLOBAL_fnc_notify;
private _group = createGroup civilian;
private _downedCiv = [_group, selectRandom sCivilian,_backOfVehArea,[],0,"NONE"] call TRGM_GLOBAL_fnc_createUnit;
private _iterations = 0;
while {isNil "_downedCiv" || {isNull _downedCiv}} do {
_downedCiv = [_group, selectRandom sCivilian,_backOfVehArea,[],0,"NONE"] call TRGM_GLOBAL_fnc_createUnit;
if (_iterations > 5) exitWith {};
_iterations = _iterations + 1;
};
if (isNil "_downedCiv") exitWith {};
[_downedCiv, "Acts_CivilShocked_1"] remoteExec ["switchMove", 0];
//_downedCiv playMoveNow "Acts_CivilInjuredGeneral_1"; //"AinjPpneMstpSnonWrflDnon";
_downedCiv disableAI "anim";
Expand Down

0 comments on commit 8df1631

Please sign in to comment.