How do I Make A countdown timer?

From the Asset Store
Tabata timer
$9.99 USD
Template for Tabata timer, fully documented in comments and video

    How do I Make A countdown timer? I want to have a clock that counts down form 24 hours by the second. So something like this: 24.00.00 => 23.59.59 => 23.59.58 and so on. How to do this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Like the other thread. YOu will need to either use a an unoffical plugin. Which you can find in the plugins section of the forum.

    Or you can learn some js and use the Browser.jsexec capabilities. C2 has no realtime clock functionality as of yet.

    Hi! I am looking for somthing similar.

    I installed the System Time Plugin () and I want to show a custom countdown.

    The User has 3 input fields. One for Days, Hours and Minutes. So if you enter 1 Day, 12 Hours it should display a Countdown counting down the entered amount of time.

    But it should work even if you close the app for a while and reopen it a few hours later (thats why you need the plugin).

    So if you launch a timer you need to get the current system time (I used the unix format) and then add the entered Amount of time and store it. And every x Seconds (or whenever you want to refresh your countdown timer) it should show the remaining time. Did anyone already create something like this or know a good/easy way to do this?

    I just tried a few things with the system time and it seems to work if you just subtract the destination time (current+entered amount for the countdown) from the current system time.

    The code:

    It displays a 5 Minute countdown counting down every second.

    /Update: Seems it does not work as expected. I added 10.000 to CurrentUnixTime (should be 10 seconds when the Unix Time is in Milliseconds?) but my Countdown shows an additional hour and adding 1 day shows 0 instead of 24 hours (only uses 0-24 for a single day and cant display more like 36 hours?)

    Any ideas how to fix this?

    I have downloaded the plugin but have yet to incorporate it and try it. Just wanted to thank you for posting the URL! It looks very helpful

    Simply have a global variable called 'timer' at a default 86400 (the seconds in a day) then an event being:

    System-every second- -subtract 1 from 'timer'

    Hope that helps.

    How do I Make A countdown timer? I want to have a clock that counts down form 24 hours by the second. So something like this: 24.00.00 => 23.59.59 => 23.59.58 and so on. How to do this?

    See the attached example.

    Bl4ckSh33p: It looks actually like a completely different subject, you should start your own topic on the issue, or maybe even seek help in the plugin's topic, in case.

    Thank you very much for your example KYATRIC. It's working now.

    Maybe I should not try to code when I need to take strong antibiotics. It sometimes makes your brain silly.

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