Cleanup Files

This commit is contained in:
Skaronator
2014-02-23 18:19:31 +01:00
parent 54ebc8aac0
commit 945ad16332
8 changed files with 1 additions and 321 deletions

View File

@@ -1,57 +0,0 @@
private ["_position","_target","_targetPos","_isAlive","_list","_isSomeone","_myDest","_agent"];
//Definitions
_agent = _this select 0;
//Add handlers
//_id = _agent addeventhandler ["HandleDamage",{_this call local_zombieDamage}];
//Loop behaviour
_list = (getposATL _agent) nearEntities ["Man",200];
_isSomeone = ({isPlayer _x} count _list) > 0;
_isAlive = alive _agent;
while {_isAlive and _isSomeone} do {
//NO TARGET
_agent disableAI "FSM";
_target = objNull;
_targetPos = [];
//Spawn roaming script (individual to unit)
_myDest = getPosATL _agent;
//Loop looking for targets
while {isNull _target and _isAlive and _isSomeone} do {
_isAlive = alive _agent;
_list = (getposATL _agent) nearEntities ["Man",200];
_isSomeone = ({isPlayer _x} count _list) > 0;
_target = _agent call zombie_findTargetAgent;
if (_isAlive and (_agent distance _myDest < 5)) then {
[_agent,_position] call zombie_loiter;
};
_agent forceSpeed 2;
sleep 1;
};
//CHASE TARGET
//Leader cries out
[_agent,"attack",0,false] call dayz_zombieSpeak;
//Start Movement loop
while {!isNull _target and _isAlive and _isSomeone} do {
_target = _agent call zombie_findTargetAgent;
_isAlive = alive _agent;
_targetPos = getPosATL _target;
//Move to target
_agent moveTo _targetPos;
_agent forceSpeed 8;
sleep 1;
};
//LOOP
_agent setVariable ["targets",[],true];
_isAlive = alive _agent;
sleep 1;
};
//Wait for a while then cleanup
sleep 5;
deleteVehicle _agent;

View File

@@ -135,7 +135,6 @@ if (_nearbyCount < 1) exitwith
if (dayz_maxCurrentZeds < dayz_maxZeds) then {
if (dayz_CurrentZombies < dayz_maxGlobalZombies) then {
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
//[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _zombied) * 525948;

View File

@@ -1,28 +0,0 @@
// private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_nearbyBuildings","_nearby","_type","_config","_canZombie","_canLoot","_dis","_keepAwayDist","_isNoone","_looted","_cleared"];//_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings
//
// _radius = _this select 0;
// _position = _this select 1;
// _inVehicle = _this select 2;
// _dateNow = _this select 3;
// _age = _this select 4;
// _locationstypes = _this select 5;
// _nearestCity = _this select 6;
//
// _looted = (_x getVariable ["looted",-0.1]);
// _cleared = (_x getVariable ["cleared",true]);
// _dateNow = (DateToNumber date);
// _age = (_dateNow - _looted) * 525948;
// //diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
// if ((_age > 10) and (!_cleared)) then {
// _nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
// {deleteVehicle _x} forEach _nearByObj;
// _x setVariable ["cleared",true];
// _x setVariable ["looted",_dateNow,true];
// };
// if ((_age > 10) and (_cleared)) then {
// //Register
// _x setVariable ["looted",_dateNow,true];
// //cleanup
// _handle = [_x] spawn building_spawnLoot;
// waitUntil{scriptDone _handle};
// };

View File

@@ -1,19 +0,0 @@
private ["_dateNow","_age","_zombied","_x"];
//_radius = _this select 0;
//_position = _this select 1;
//_inVehicle = _this select 2;
_dateNow = _this select 3;
_age = _this select 4;
//_locationstypes = _this select 5;
//_nearestCity = _this select 6;
//_maxZombies = _this select 7;
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _zombied) * 525948;
if (_age > 1) then {
_x setVariable ["zombieSpawn",_dateNow,true];
[_x] call building_spawnZombies;
};

View File

@@ -1,42 +0,0 @@
#define WHITE [1,1,1,1]
#define GREY [0.75,0.75,0.75,1]
#define GREEN [0.6,0.8,0.4,1]
#define RED [1,0.1,0,1]
private["_task", "_taskDescription", "_taskStatus", "_taskParams"];
_task = _this select 0;
_taskDescription = (taskDescription _task) select 1;
_taskStatus = toUpper(taskState _task);
_taskParams = switch (_taskStatus) do
{
case "CREATED":
{
[format["NEW TASK ASSIGNED: \n%1", _taskDescription], WHITE, "taskNew"]
};
case "ASSIGNED":
{
[format["ASSIGNED TASK: \n%1", _taskDescription], WHITE, "taskCurrent"]
};
case "SUCCEEDED":
{
[format["TASK ACCOMPLISHED: \n%1", _taskDescription], GREEN, "taskDone"]
};
case "FAILED":
{
[format["TASK FAILED: \n%1", _taskDescription], RED, "taskFAILED"]
};
case "CANCELED":
{
[format["TASK CANCELED: \n%1", _taskDescription], GREY, "taskDone"]
};
};
taskHint _taskParams;