Files
DayZ-Epoch/dayz_code/compile/zombie_loiter.sqf
Aaron Clark 76e9a0582e 0.1
2012-11-04 20:28:50 -06:00

21 lines
446 B
Plaintext

private["_unit","_originalPos","_pos"];
_unit = _this select 0;
_originalPos = _this select 1;
_pos = getPosATL _unit;
if (count _this > 2) then {
_pos = _this select 2;
} else {
//_unit enableAI "MOVE";
//_unit enableAI "ANIM";
_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
};
if(isNull group _unit) then {
_unit moveTo _pos;
} else {
_unit domove _pos;
};
_unit forceSpeed 2;
_unit setVariable ["myDest",_pos];