How to restart a timer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SebSharper

Hey guys, I need to make a timer “restart”
Let’s say a panel shows up, and I need that automatically, x seconds after, the panel hides, however, if the user clicks, I need this countdown to pause, and when they stop clicking, restart, so that it won’t hide automatically while the user is clicking.
Is there any way to make this work?

1 Like
:bust_in_silhouette: Reply From: jgodfrey

You can start, stop and pause a Timer object. Check out the docs here:

Appropriately coupling those functions to your mouse-clicks should allow you to create a mechanic like you describe…