– TimeSwitch with delay: (Remeber to remove the RuntimeEventListener() when you´re done)
local updateBlock1 = {}
local updateBlock2 = {}
local updateTimer = {}
local gameTimer = {}
local switch = true
updateBlock1 = function()
print(“I´m inside updateBlock 1 with delay=5700”)
switch = true
end
updateBlock2 = function()
print(“I´m inside updateBlock 2 with delay=5000”)
switch = false
end
updateTimer = function()
local delay
if ( switch == false ) then
delay = 5700
gameTimer = timer.performWithDelay(delay, updateBlock1, 1)
elseif ( switch == true ) then
delay = 5000
gameTimer = timer.performWithDelay(delay, updateBlock2, 1)
end
end
Runtime:addEventListener(“enterFrame”, updateTimer)
–[[
Then you can just adjust the delay and put the brick:removeSelf or whatever you like inside the different functions
Hope this helps you out
–]]