Need an expression for minutes and seconds for a countdown timer

The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
edited August 2013 in Working with GS (Mac)
I know the expression for minutes and seconds for counting up. Tried to do the same with a count down timer. It shows the seconds but won't show the minutes. I have a three minute timer so 180 seconds and using the usual constrain expression Timer to 180-(selftime -starttime). I usually do a custom font but I already have one setup and this will be a different so I need to use an internal font. I'm also pondering a way to use two custom fonts for clocks.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    I'm not quite sure I understand. Why can't you have two different custom fonts? Or maybe that's not the question?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited August 2013
    How would I adjust the numbering as I usually number them 1,2,3,4 ett can't have two sets of images the same name. Was thinking of adding a character and somehow adding that to the .png like self.score2 r.png
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited August 2013
    Sure - Just have one set named 1, 2, etc.

    Add another set with the name "nb-1", "nb-2" etc.

    Then take a look at this pic attached.

    What this does is look for the images with the prefix "nb-" then the number of the attribute. This grabs the correct images.

    the "nb-" could be anything, you decide..

    Or, and I'm sure you know this, just create another actor with the custom font expression. Just change the value of the attribute to the clock attribute...
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Ah cool I was thinking that. Thanx! Will do.
  • BBEnkBBEnk Member Posts: 1,764
    you can have more then one set I do it in my game just name then 1a,2a and so on and for second set ,1b,2b etc then when you reference the image do so like "a.png" or "b.png" etc
Sign In or Register to comment.