Hello Community, I’m using 2 timers, one of those timers calls the other one (many times), but I have a problem pausing the second timer, because the first timer creates a lot of copies of the second timer and the pause function just pauses the last timer created and I need to pause all those timers. Here’s a sample code:
local timer1
local timer2
timer1 = timer.performWithDelay ( 1000, startTimer2, 5 )
local function startTimer2 ()
timer2 = timer.performWithDelay ( 4000, test, 1 )
end
local function test ()
print ( "Timer" )
end
local function pause ()
timer.pause ( timer2 )
end
Note: There are some mistakes to run the code correctly, but there you can see what I trying to do.
I need to pause and resume every timer ( timer2 ) created.
Thanks…
[import]uid: 81091 topic_id: 18908 reply_id: 318908[/import]
[import]uid: 52491 topic_id: 18908 reply_id: 72861[/import]