Basic Timer Questions

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

I want to create a timer in a 2d grid turn based game.

Q1 - put the timer object in the game manager scene or the UI scene?

Q2 - looking at the timer documentation, I do not see any method for resetting the timer. I would like there to be a hard limit of 60 seconds per turn, but I only see start, stop, get remaining time, etc functions.

Any other pointers or known tutorials of any similar game in godot would be helpful links, thanks.

:bust_in_silhouette: Reply From: Inces
  1. Timer should be in a scope, that persists through scenes You want to take part in turn based section of a game. If your UI is not queued free at the time turn based system is still going on - there is no problem of placing timer there. Still, game menager is most likely better place, because You will be able to take reference to timer much easier from there.

  2. start()resets the timer. To change the time, You can use new value as an argument of start, like start(6.5), or manually set wait_time, like wait_time = 6.5.
    start() with no argument just resets the timer with original wait_time