I've used smallg's script adapted with distance, but must set entity shades to Highest in game to show the light
The smallg's script "light_flicker.lua" with player distance here:
-- The light alarm starts when the player enters in the zone then it stops when the player leaves the zone
local delay = {}
local init_delay = {}
local on = {}
function light_flicker_init(e)
--change time here to adjust flicker timing
delay[e] = 350
init_delay[e] = delay[e]
on[e] = 0
end
function light_flicker_main(e)
PlayerDist = GetPlayerDistance(e)
if GetTimer(e) > delay[e] and PlayerDist < 350 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
if PlayerDist > 400 and on[e] == 1 then
on[e] = 0
HideLight(e)
Destroy(e)
ActivateIfUsed(e)
end
end
Smile today, tomorrow could be worse
http://bestradiolarry.ro/fpsarea/
"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."