--[[function OnWaveReset(wave) timer.Stop(timerOff) timer.Stop(timerOn) dummy1 = Entity('logic_relay', true,true) dummy2 = Entity('logic_relay', true,true) dummy1:SetName('dummy_relay_on') dummy1:AddOutput('OnTrigger point_spotlight:LightOff:0:-1') dummy2:SetName('dummy_relay_off') dummy2:AddOutput('OnTrigger point_spotlight:LightOn:0:-1') end]] function OnWaveStart(wave) --timer.Stop(timerOff) --timer.Stop(timerOn) dummy1 = Entity('logic_relay', true,true) dummy2 = Entity('logic_relay', true,true) dummy1:SetName('dummy_relay_on') dummy1:AddOutput('OnTrigger point_spotlight:LightOff:0:-1') dummy2:SetName('dummy_relay_off') dummy2:AddOutput('OnTrigger point_spotlight:LightOn:0:-1') blink() end function lightOff() dummy1:FireOutput('OnTrigger','point_spotlight,LightOff',dummy1,0) end function lightOn() dummy2:FireOutput('OnTrigger','point_spotlight,LightOn',dummy2,0) end function blink() local randTime1, randTime2 local x = 0 while x < 50 do randTime1 = math.random(1,100) / 10 --print(randTime1) randTime2 = math.random(1,100) / 10 + randTime1 --print(randTime2) timer.Create(randTime1,lightOff,1) timer.Create(randTime2,lightOn,1) x = x + 1 end end