How do I make a 60 minutes count down visible in all layouts?

0 favourites
  • 5 posts
From the Asset Store
Set of 60 cursors. All icons are of a high quality. A good choice for RPG game.
  • I'm trying to make an escape room game.

    I would like to make a clock/timer which is visible in every layout, always. Also when another browser tab is opened I would like it to continue counting down.

    Could someone please explain to me how to do that?

    I was able to create a timer this way, although it is probably not the most convenient way.

    But still, when I move to another layout or open another browser tab, the timer temporarely stops counting down.

    Could someone please help me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just wondering:

    1) Is your timer on a separate event sheet?

    2) Are your layouts sharing same event sheet or different event sheets?

    I implemented a timer on my game and it works fine each level

  • I'm not sure why you are splitting it into two separate variables for min and sec.

    This is counting up in hours/mins, but you could use the same principle:

    [System | every 1 second] > [time.var | set value to "time var + 1"]

    [text] > [set text to | zeropad(int(time.var/3600% 60)) & ":" & zeropad(int(time.var/60% 60))]

    Also, by this way, just make the 'time.var' a global variable and then you can use it across all layouts.

  • Thank you all so much! BaconSwagg Your solution really made it visible and understandable for me!

    Ididn't realise because the timer was only in 1 eventsheet that's why it didn't continue in other layouts. It was really as simple as copy-paste.

    Thanks again a lot!

    Maybe you also know how to keep the timer moving (or recalculate) when the player is moving browser tabs (game is suspended). I would like the clock to keep counting down so that the player can not 'pause' the game by moving to another browser tab.

    I read other posts about this, and people recommended "wallclocktime" but I really have no idea how to even find and use that function. Could you maybe help out with that too?

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