How do i make a Timmer?

Hey, I was wondering on how to make a timer for my game.

I wanted to make it where when you click a button, smoke will appear only for a certain amount of time then stop.

t = Timer(2.00, self.smoke.hide)

I tried using this and it works but when I try to click the buttons it says I can only start the timer once.

Is there any way I could make it where I can reset the timer or something like that so I could start it again?

Thank you, Noah


I would use intervals for this.

t = Sequence(Func(,Wait(2.0),Func(self.smoke.hide))

If you want to restart the interval, finish it before you start it again using t.finish()

Yes, thank you very much. I don’t know why I didn’t just use an interval sequence instead of a timer lol.