Can I do a pause and play in a Timer?

I have a timer in my screen

its like:

timer1 = timer.performWithDelay( 1000, addtoit, 0 )

can I set a variable to pause him and after I return of pause game, the timer1 continue counting?? [import]uid: 23063 topic_id: 10050 reply_id: 310050[/import]

yes (if you are on the same scene elseif you are changing scene it may gives you error)
but another solution,

instead of setting variable when you want to pause ur game just cancel timer

timer.cancel(timer1)

and when you want to resume again add that timer

timer1 = timer.performWithDelay( 1000, addtoit, 0 ) [import]uid: 12482 topic_id: 10050 reply_id: 36749[/import]

thanks, that’s work :smiley: [import]uid: 23063 topic_id: 10050 reply_id: 36750[/import]