Countdown in milliseconds ? help ?

JamieOneilJamieOneil Member Posts: 877
edited November -1 in Working with GS (Mac)
How can i have a countdown from 5 with milliseconds ?
thanks in advance.
Jamie

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    http://www.youtube.com/user/GameSaladCookbook#p/u/25/zDWJ9oarQUo

    This video is titled; Displaying Time (down to milliseconds) in Game Salad.

    Make sure you check the CookBook first ;-)

    Good luck!
  • JamieOneilJamieOneil Member Posts: 877
    DrGlickert said:
    http://www.youtube.com/user/GameSaladCookbook#p/u/25/zDWJ9oarQUo

    This video is titled; Displaying Time (down to milliseconds) in Game Salad.

    Make sure you check the CookBook first ;-)

    Good luck!

    seen it before, it wont work when your using attributes for me ? and its a countdown not a timer
  • Rob2Rob2 Member Posts: 2,402
    5 thousandths of a second...are you sure? :)

    edit: sorry.. you want to count down from five seconds :)
  • Rob2Rob2 Member Posts: 2,402
    5-floor( game.Time %10)..":"..(floor( game.Time *10)%10)..floor(floor( game.Time *100)%10)

    does the displaying but that will go all negative on you so....

    (the last column is hundredths, not milliseconds by the way)
  • JamieOneilJamieOneil Member Posts: 877
    Rob2 said:
    5-floor( game.Time %10)..":"..(floor( game.Time *10)%10)..floor(floor( game.Time *100)%10)

    does the displaying but that will go all negative on you so....

    (the last column is hundredths, not milliseconds by the way)

    THANK YOU :D thats very helpful :)
  • Rob2Rob2 Member Posts: 2,402
    scratch that :) the hundredths and tenths are going in the wrong direction of course (I thought that was too easy :)
  • Rob2Rob2 Member Posts: 2,402
    much better...!! do a display text of

    5-self.time

    (doh)

    edit: I'm loosing the plot ! that obviously works nicelyish on scene launch but at other times in your game you would need to grab self.time add 5 to it and then subtract self time from that.
Sign In or Register to comment.