can timer delay be reset?

I used pause and resume after specifying a new delay but the timer seems to ignore that, is it so that once a timer is created (listener with timer.performWithDealy) the delay cannot be changed? [import]uid: 109677 topic_id: 23099 reply_id: 323099[/import]

I know if you assign the timer to a variable you can cancel the timer…

[lua]local timer1 = timer.performWithDelay(3000,myFunction)
–later on in your code you can cancel it with

if timer1 then timer.cancel(timer1) end – check to see if the timer has been created before you issue the cancel.

–so i would assume if you know you want to change it. you can
– cancel the current one and create a new one right there.[/lua] [import]uid: 88147 topic_id: 23099 reply_id: 92389[/import]

I’m also looking for answer to this question

I was doing:

[lua]local speed = 5;

–Then later in the code

speed = speed + 5;

–Then later

timer.performWithDelay(speed,SpawnAsteroid,-1)
–To spawn asteroids faster and faster[/lua]

I was doing this so as the game progressed the asteroids I was shooting would spawn faster and faster. Took me a while to figure out it actually wasn’t increasing the speed.

Does anyone have a workaround for this? [import]uid: 123298 topic_id: 23099 reply_id: 100178[/import]

Whoops, sorry for the double post. [import]uid: 123298 topic_id: 23099 reply_id: 100179[/import]