How can I create a timer?

0 favourites
  • 5 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • Hi! The scenario is like this. If the player cannot finish the game in the given time and the timer ticks to 0:00 the game will then appear a pop-up window telling him/her that he/she lose. Is it possible? Thanks! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • A.

    countdown = time + X

    if time > countdown

    GAME OVER

    B.

    on game start(however everything starts

    sub event:

    -> WAIT 60 seconds

    -> whatever game over stuff you have

    A will give you options to modify the countdown timer.

    B will end the game after the period time no matter what.

    Time scale will affect both of these time results.

  • Let's say the player has 60 seconds to complete the game.

    Create a Number type Global Variable and name it 'Timer' and set it equal to 60

    Create events

    1. System - Every 1.0 Seconds

          System - Subtract 1 from Timer

    2. System - Timer <= 0

           (insert end results here)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the replies! <img src="smileys/smiley4.gif" border="0" align="middle" /> How about displaying the timer in the actual game?

  • This you should already know if you had gone through the beginner's guide for C2.

    Every tick: set a Text text to your timer value.

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