1.7.5.D1222

This commit is contained in:
A Clark
2012-12-24 10:33:50 -06:00
parent 6e664d72c2
commit de7f3a17d0
16 changed files with 330 additions and 288 deletions

View File

@@ -3,7 +3,7 @@ _position = _this select 0;
_unitTypes = _this select 1;
_doLoiter = true;
_isNoone = {isPlayer _x} count (_position nearEntities ["AllVehicles",30]) == 0;
_isNoone = {isPlayer _x} count (_position nearEntities ["CAManBase",30]) == 0;
_loot = "";
_array = [];
_agent = objNull;
@@ -24,26 +24,21 @@ if (_doLoiter) then {
_radius = 40;
_method = "NONE";
};
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
if (_nearByPlayer) then {
_position = [_position,25,80,10,0,0,0] call BIS_fnc_findSafePos;
};
_agent = createAgent [_type, _position, [], _radius, _method];
if (_doLoiter) then {
//_agent setPosATL _position;
_agent setPosATL _position;
//_agent setVariable ["doLoiter",true,true];
_agent setDir round(random 180);
} else {
_agent setVariable ["doLoiter",false,true];
};
dayz_spawnZombies = dayz_spawnZombies + 1;
//diag_log ("CREATE INFECTED: " + str(_this));
//_position = getPosATL _agent;
//_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
_position = getPosATL _agent;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
if (random 1 > 0.7) then {
_agent setUnitPos "Middle";
@@ -51,24 +46,29 @@ if (random 1 > 0.7) then {
//diag_log ("CREATED: " + str(_agent));
/*
//_agent setVariable["host",player,true];
if (!_doLoiter) then {
_agent setPosATL _position;
_agent setDir round(random 180);
_agent setVariable ["doLoiter",false,true];
if (_nearByPlayer) then {
deleteVehicle _agent;
};
} else {
if (_nearByPlayer) then {
_attempt = 0;
while {_nearByPlayer} do {
_position = [_position,40,80,10,0,20,0] call BIS_fnc_findSafePos;
_agent switchmove AidlPpneMstpSnonWnonDnon_SleepA_layDown;
_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos;
_agent setPos _position;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
_attempt = _attempt + 1;
if (_attempt > 10) exitWith {};
} else {
_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos;
_agent setPosATL _position;
};
_agent setPos _position;
};
};
*/
if (isNull _agent) exitWith {
dayz_spawnZombies = dayz_spawnZombies - 1;