function init() lights = FindLights("blink") end function draw() for i=1, #lights do local l = lights[i] local p = tonumber(GetTagValue(l, "blink")) local s = math.sin((GetTime()+i) * p) SetLightEnabled(l, s > 0) end end