You have to name the script exactly light_flicker
as in the script _init(e) and _main(e)
if you want to use lightflash, then the code is like this:
local delay = {}
local init_delay = {}
local on = {}
function lightflash_init(e) -- name
--change time here to adjust flicker timing
delay[e] = 250
init_delay[e] = delay[e]
on[e] = 0
end
function lightflash_main(e) -- name
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,1500)
end
end
harry
Harry