How do I make a timer in the HUD of my game?

0 favourites
  • 3 posts
From the Asset Store
Tabata timer
$9.99 USD
Template for Tabata timer, fully documented in comments and video
  • Hi, I'm very new to using construct 2 and I can't seem to figure out how to have a timer running in the HUD of my game which, on the player being destroyed, stops and shows the survival time of the player. If anyone could help me it would be much appreciated. I will upload what I have done if anyone wants to see it. Thanks.

  • You use 2 variables, one for minutes and one for seconds.

    Every second you will add 1 to the second variable and when the second variable is 60 you will change it back to 0 and add 1 to the minute variable.

    You will then put those variables in a text object using "Set Text" to variable_minutes & ":" & variable_seconds.

    Everything I just mentioned will only work with a condition like "player is alive", so it stops working when the player has died.

    Hopefully this helps you a bit in the right direction

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Global variable = Timer

    Text object

    System - Every tic = Text - Set text to "Time:" & Global variable timer

    System - Every 1 second - System - Add 1 to Timer global variable

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)