to make the light flicker more randomly just uncomment the line
Quote: "delay[e] = GetTimer(e) + math.random(100,1500)"
the values are milliseconds so 100 is 0.1s and 1500 is 1.5s, so to make the flicker slower make both values higher, to make it more varied adjust the second value higher only
like so
local delay = {}
local init_delay = {}
local on = {}
function light_flicker_init(e)
--change time here to adjust flicker timing
delay[e] = 250
init_delay[e] = delay[e]
on[e] = 0
end
function light_flicker_main(e)
if GetTimer(e) > delay[e] then
if on[e] == 0 then
on[e] = 1
ShowLight(e)
else
on[e] = 0
HideLight(e)
end
delay[e] = GetTimer(e) + init_delay[e]
--to make more random use this line
delay[e] = GetTimer(e) + math.random(100,5000)
end
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11