merged in Axemans pull

This commit is contained in:
[VB]AWOL
2013-09-26 20:42:57 -05:00
parent c1339e4a6e
commit ccd685ab76
29 changed files with 2855 additions and 2647 deletions

View File

@@ -1,6 +1,6 @@
/*
DayZ Epoch Lighting System - Fail / Switch Off Lights
Made for DayZ Epoch please ask permission to use/edit/distrubute email axeman@thefreezer.co.uk.
DayZ Epoch Lighting System - Lights Out
Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email gregory.andrew@gmail.com or vbawol@veteranbastards.com.
*/
private ["_hsRange","_rng","_pos","_hsCount","_nrstTrig","_objHouses","_objHouse","_nrTowers","_doRand","_rnd","_animlightpoint","_hasLight","_sleeptime","_lightstate","_objLightPoint"];
_rng = _this select 0;//Full distance to turn off all lights if required
@@ -36,7 +36,7 @@ _objHouses = nearestObjects [_nrstTrig, ["House"], _hsRange];
if(_hasLight)then{deleteVehicle _animlightpoint;};
_objHouse animate ["Lights_1",0];
_objHouse animate ["Lights_2",0];
_objHouse setVariable ["axeHLight", 0, true];//Fail light house leccy supply
_objHouse setVariable ["axeHLight", 0, false];//Fail light house leccy supply
};
};
}else{//Switch them all off
@@ -46,9 +46,8 @@ _nrTowers = nearestObjects [_nrstTrig, ["Land_Ind_IlluminantTower"], _rng];
if(count _objHouses >0)then{
{
_pos = getPos _x;
_objLightPoint = nearestObject [_x, "#lightpoint"];
if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))<1.5)then{
if((abs ([getPos _x, _objLightPoint] call BIS_fnc_distance2D))<1.5)then{
deleteVehicle _objLightPoint;
};
}forEach _objHouses;
@@ -58,16 +57,15 @@ _nrTowers = nearestObjects [_nrstTrig, ["Land_Ind_IlluminantTower"], _rng];
{
_x animate ["Lights_1",0];
_x animate ["Lights_2",0];
_x setVariable ["axeHLight", 0, true];
_x setVariable ["axeHLight", 0, false];
}forEach _objHouses;
};
if(count _nrTowers >0)then{
{
_pos = getPos _x;
for "_s" from 1 to 4 do {
_objLightPoint = nearestObject [_x, "#lightpoint"];
if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))<25)then{
if((abs ([getPos _x, _objLightPoint] call BIS_fnc_distance2D))<25)then{
deleteVehicle _objLightPoint;
};
};