mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Update fn_lightFunctions.sqf
This commit is contained in:
@@ -19,17 +19,21 @@ axe_streetLamps=[];
|
|||||||
|
|
||||||
if (_objName in _lights) then {
|
if (_objName in _lights) then {
|
||||||
if(_rndLights<random 100)then{
|
if(_rndLights<random 100)then{
|
||||||
|
if(_rndLights/3>random 100)then{//Reduce chance more due to speed of script
|
||||||
for "_s" from 1 to 6 do {
|
|
||||||
if(_s%2==0)then{
|
for "_s" from 1 to 8 do {
|
||||||
_x switchlight "off";
|
if(_s%2==0)then{
|
||||||
}else{
|
_x switchlight "off";
|
||||||
_x switchlight "on";
|
}else{
|
||||||
|
_x switchlight "on";
|
||||||
|
};
|
||||||
|
_sleeptime=(random 220)/100;
|
||||||
|
sleep _sleeptime;
|
||||||
};
|
};
|
||||||
_sleeptime=(random 100)/100;
|
_x switchlight "off";
|
||||||
sleep _sleeptime;
|
}else{
|
||||||
|
_x switchlight "on";
|
||||||
};
|
};
|
||||||
_x switchlight "off";
|
|
||||||
}else{
|
}else{
|
||||||
_x switchlight "on";
|
_x switchlight "on";
|
||||||
};
|
};
|
||||||
@@ -76,16 +80,19 @@ _doLit = _this select 4 select 0;
|
|||||||
_twrPos = getPos _twr;
|
_twrPos = getPos _twr;
|
||||||
_rad=2.65;
|
_rad=2.65;
|
||||||
_oset=14;
|
_oset=14;
|
||||||
_nrTLs= position _twr nearObjects ["#lightpoint",30];
|
_nrTLs= position _twr nearObjects ["#lightpoint",20];
|
||||||
|
|
||||||
if(count _nrTLs > 3)then{
|
if(count _nrTLs > 3)then{
|
||||||
{
|
|
||||||
if(_doLit)then{
|
{
|
||||||
[_lCol,_lbrt,_lamb,_x] call axe_lightPoint;
|
if(_doLit)then{
|
||||||
}else{
|
[_lCol,_lbrt,_lamb,_x] call axe_lightPoint;
|
||||||
deleteVehicle _x;
|
}else{
|
||||||
};
|
deleteVehicle _x;
|
||||||
sleep .2;
|
};
|
||||||
}forEach _nrTLs;
|
sleep .2;
|
||||||
|
}forEach _nrTLs;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if(_doLit)then{
|
if(_doLit)then{
|
||||||
for "_tls" from 1 to 4 do {
|
for "_tls" from 1 to 4 do {
|
||||||
|
|||||||
Reference in New Issue
Block a user