Files
DayZ-Epoch/dayz_code/compile/zombie_loiter.sqf
vbawol 3c9df28ead 0.981 + 1.7.6.1 CE
+ Increased raise horde distance to 65m.
+ decreased raise horde action timer to 7 seconds.
+ sync with 1.7.6.1 CE
2013-02-26 20:05:35 -06:00

34 lines
804 B
Plaintext

private["_unit","_originalPos","_pos"];
_unit = _this select 0;
_originalPos = _this select 1;
_pos = getPosATL _unit;
_playerpos = getPos player;
if (count _this > 2) then {
_pos = _this select 2;
} else {
//_unit enableAI "MOVE";
//_unit enableAI "ANIM";
_chance = round(random 12);
if ((_chance % 4) == 0) then {
//_Offset = [0,0,0];
//_playerworldPos = _playerpos modelToWorld _Offset;
_pos = [_playerpos,30,120,4,0,5,0] call BIS_fnc_findSafePos;
} else {
_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
};
if (_unit distance player > 250) then {
_pos = [_playerpos,120,200,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];