Just a quick question: Does anyone know of a way to change what time of day NPCs turn their flashlights on and off? My mod has longer nights, and NPCs are at a significant disadvantage if the player sneaks into their base at night before or after the default flashlight use period. Ideally, I'd like to get NPCs turning them on earlier and off later. Is this possible?
"Get out of here, stalker." - Duty on the only way into their territory.
You can make it even further exact, if you want to adjust it down to the minute. The conditionals I've been using for years:
local htime = level.get_time_hours()
local mtime = level.get_time_minutes() / 100
local rtime = htime + mtime
if (rtime <= 4.17) or (rtime >= 21.32) then
light = true
light = false
Never had any issues with it - I had needed something a little more "exact" back when I was still designing Frozen Sky because of the weather lighting interaction... because of the "snow" effect, I kept ambient light high for quite some time after "sunset," and then it got dark quickly. Because of how weather hour rendering is handled, I had to write the above to keep NPCs from stumbling around in the dark for about 20 game minutes, lol
nice work Imp, now i've finally been able to match the Headlamps with the SWO sunrise/sunset timings.
Can this script also control headlamps staying on when an NPC is killed? If someone has their headlamp turned on, and they are shot dead, the headlamp automatically turns off, which is retarded! Can this be set so that it stays on, if it was already on in the 1st place? like in the old demos...
IIRC - someone had written a function for that script somewhere that addresses such, and takes care of the light becoming attached to the floor. It might be in ZRP, or NatVac could point you in the right direction. From what I remember it was a little hack&slash, but did it's job...
Hmmm - I don't remember, to be honest. I want to say it was a self-updater attached from the sr_light.script to bind_stalker.script, so there were occasional delays in killing the light after an NPC died :/
Wow, 2004, though... I sometimes forget how long SoC was in development, lol.