Lighting System by Axeman[edit | edit source]
22.214.171.124 Changes / Updates:[edit | edit source]
Returned street lights to original arma built in street lights (now shootable). Finalized with or without generator options, variable dependent on generator requirement. Added options at mission init level. Added randomness. Optimized house lightpoint creation, now shows windows at a distance and keeps lightpoint creation to a realistic view-able distance. Tower lights still tower lights :)
Options:[edit | edit source]
in the init.sqf the lights function is now called with (a couple of examples): NB.There are lots of variables here that will most likely be removed in future versions to simplify the settings. For now I wanted to have as much available at the mission file level to deal with any unforeseen tweaking requirements before the next update. When changing variables, try not to make extreme adjustments as there is a balance between lights coming on and lights failing. Extreme settings may result in unexpected behavior :)
Without Generator Requirement[edit | edit source]
[0,0,true,true,false,58,180,440,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
With Generator Requirement[edit | edit source]
[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
The variables (in order):[edit | edit source]
Start hour (24 hour)
Finish Hour (24 hour)
If defaults of zero are used lights will automatically come on 30mins before sundown and go off 30mins after sunrise.
House Lights: true/false
Tower Lights: true/false
Require a generator for house and tower lights? A running generator will always apply 100% reliability to lights within it's range.
Percentage chance of random light failure including street lights. 100 = 100% reliability.
Trigger range Street lights will be randomly failed at this range. Lights will be lit at this distance from a generator when required.
Player range Lights will be lit at just under this distance from the player if they are on. Lightpoints around this distance will be cleaned up after use.
RGB color value for house and street lights.
Generator class Requires variable of GeneratorRunning to be true for lights to be triggered.
Sleep time script will pause for this long on each loop. Will delay lights being triggered or randomly failed.