Timer issue and countdown

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

Hi everyone! Today I have two problems to solve, both related to the timer: I created a 2D runner game, and I would like the words “Get ready!” to appear before the game begins. Also, I would like to create a countdown consisting of minutes and seconds.
Thank you so much!

:bust_in_silhouette: Reply From: Jowan-Spooner

That doesn’t really sounds like problems, but here’s the answer anyway:

  1. Create a Timer (one shot = false, wait time = 1) and two labels (“Get ready!”, “3”)
  2. When starting your game write something like this:

$Counter.show() # the second Label
yield($Timer, “timeout”)
$Counter.text = “2”
yield($Timer, “timeout”)
$Counter.text = “1”
yield($Timer, “timeout”)
$Counter.text = “3”
start_game() # or something similar

Good Luck!

IT WORKS! Thank you so much! :wink:

Rob1980 | 2018-12-22 10:31