Update compiles - 2 more files to do

fn_selfActions.sqf
player_updateGui.sqf
This commit is contained in:
icomrade
2016-02-29 00:26:12 -05:00
parent a83909b918
commit b96cd2d971
67 changed files with 3886 additions and 1212 deletions

View File

@@ -1,30 +1,98 @@
private ["_unit","_distance","_listTalk","_zombie","_targets","_pos","_doRun"];
//Alert Zed's to noise of shot
private ["_unit","_distance","_doRun","_pos","_listTalk","_zombie"];
_unit = _this select 0;
_distance = _this select 1;
_doRun = _this select 2;
_pos = _this select 3;
_listTalk = _pos nearEntities ["zZombie_Base",_distance/2];
if ("ItemMap_Debug" in items player) then {
diag_log ("alertzeds Unit: " +str(_unit));
diag_log ("alertzeds Distance: " +str(_distance/2));
diag_log ("alertzeds DoRun: " +str(_doRun));
diag_log ("alertzeds Pos: " +str(_pos));
diag_log ("alertzeds ListTalk: " +str(_listTalk));
};
//hint str(_listTalk);
_listTalk = _pos nearEntities ["zZombie_Base",_distance];
_inVehicle = (vehicle _unit != _unit);
_isAir = vehicle player iskindof "Air";
_isLand = vehicle player iskindof "Land";
_isSea = vehicle player iskindof "Sea";
_speed = speed (vehicle _unit);
{
private["_localtargets","_remotetargets","_targets","_dis"];
_distance = _distance max floor(_distance*.9);
_dis = _x distance _unit;
_zombie = _x;
switch (true) do {
case (_dis < 51): {
if (_doRun) then {
_localtargets = _x getVariable ["localtargets",[]];
_remotetargets = _x getVariable ["remotetargets",[]];
_targets = _localtargets + _remotetargets;
if (!(_unit in _targets)) then {
switch (local _x) do {
case false: {
_remotetargets set [count _remotetargets,_unit];
_x setVariable ["remotetargets",_remotetargets,true];
};
case true: {
_localtargets set [count _localtargets,_unit];
_x setVariable ["localtargets",_localtargets,false];
};
};
};
} else {
_zombie setVariable ["myDest",_pos,true];
};
};
case ((_dis > 50) and (_dis <= 71)): {
_50 = round(random 100);
if (_50 < 50) then {
if (_doRun) then {
_localtargets = _x getVariable ["localtargets",[]];
_remotetargets = _x getVariable ["remotetargets",[]];
_targets = _localtargets + _remotetargets;
if (!(_unit in _targets)) then {
switch (local _x) do {
case false: {
_remotetargets set [count _remotetargets,_unit];
_x setVariable ["remotetargets",_remotetargets,true];
};
case true: {
_localtargets set [count _localtargets,_unit];
_x setVariable ["localtargets",_localtargets,false];
};
};
};
} else {
_zombie setVariable ["myDest",_pos,true];
};
} else {
_zombie setVariable ["myDest",_pos,true];
};
};
case (_dis > 70): {
_zombie setVariable ["myDest",_pos,true];
};
};
/*
_zombie = _x;
if (_doRun) then {
_targets = _zombie getVariable ["targets",[]];
_localtargets = _x getVariable ["localtargets",[]];
_remotetargets = _x getVariable ["remotetargets",[]];
_targets = _localtargets + _remotetargets;
if (!(_unit in _targets)) then {
_targets set [count _targets,_unit];
_zombie setVariable ["targets",_targets,true];
switch (local _x) do {
case false: {
_remotetargets set [count _remotetargets,_unit];
_x setVariable ["remotetargets",_remotetargets,true];
};
case true: {
_localtargets set [count _localtargets,_unit];
_x setVariable ["localtargets",_localtargets,false];
};
};
};
} else {
_zombie setVariable ["myDest",_pos,true];
};
} count _listTalk;
*/
} forEach _listTalk;