GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

count up timers like the timer in Red Bit Escape

Need to make a timer like the one in" Red Bit Escape ". Please help! I don't know how to display the end time when you get out and the time should be counting in one hundredths of a second(.01). Please Help!

Comments

  • SocksSocks London, UK.Posts: 12,822Member
    edited December 2014

    ...

  • tatiangtatiang Posts: 11,796Member, Sous Chef, PRO, Senior Sous-Chef
    edited December 2014

    Make two real attributes called game.startTime and game.elapsedTime.

    Change Attribute game.startTime to game.Time

    Constrain Attribute game.elapsedTime to game.Time-game.startTime

    DisplayText round(game.elapsedTime,2)

    If you want the elapsed time to stop at a certain point then place the Constrain Attribute behavior in the Otherwise/Else section of a rule that gets triggered "when you get out."

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • wayback_gamerwayback_gamer USPosts: 124Member, PRO

    How can I display the minutes I am counting and separate them with a colon with this timer? Please see attached image for current code that displays seconds and resets to 0 every 60 seconds and adds 1 to a counter variable.

Sign In or Register to comment.