User Tag List

Results 1 to 4 of 4

Thread: Adding a timer to stages

  1. #1
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding a timer to stages

    I'm currently using the TimeX object to add a stopwatch to my game. Each stage will display how long it took you to complete it at the very end of each. Now, I can get Minutes and Seconds to appear without fail. But I cannot get Milliseconds to appear correctly. This is most likely due to the fact that I'm running the game at 60 FPS. Is there a formula I can use to make the counter display the correct milliseconds?

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Adding a timer to stages

    Time is Time, no matter what the framerate. What sort of values is TimeX giving you for milliseconds?
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Adding a timer to stages

    Example of the code I'm using:

    (TimeEvery 1000 Milliseconds --> Add 1 the "Seconds Counter"
    (TimeEvery 60000 Milliseconds --> Add 1 the "Minutes Counter"

    These two events work fine. It's this one that doesn't

    (Time Every 1 millisecond --> Add 1 to "Milliseconds Counter"

    At most, this counter only goes up to 60 before completely resetting, which is my current frame rate. I want this counter to accurately display the correct time in milliseconds.

  4. #4
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Adding a timer to stages

    I found a function that displays this correctly:

    Str$(timer/3600000)+":"+Str$((timer/60000) mod 60)+":"+Str$((timer/1000) mod 60)+":"+Str$(timer mod 1000)

    But the downside to this is that it doesn't reset at the start of every frame, but rather keeps on counting from the beginning of the app. Any ideas on how to reset this to 0 whenever a new frame begins?

    EDIT: Nevermind. Got it all figured out.

Similar Threads

  1. How do you Create a Global Timer as a Countdown Timer
    By redpandagames in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 23rd February 2017, 10:08 AM
  2. Is it possible to create 10 stages or more using 1 frame?
    By gamer123 in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 2nd April 2012, 08:11 PM
  3. How to create stages/level pack help
    By foyzul2002 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th March 2012, 08:16 PM
  4. Adding a zero.
    By Fimbul in forum File Archive
    Replies: 1
    Last Post: 15th November 2009, 10:06 PM
  5. Going up/down slopes during auto scrolling stages?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th October 2009, 08:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •