0 votes

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.

in Engine by (21 points)

1 Answer

0 votes
  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 waittime, like wait_time = 6.5.
    start() with no argument just resets the timer with original wait
    time

by (7,447 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.