20 seconds Countdown with custom fonts

franken2778franken2778 Member Posts: 54
edited February 2012 in Working with GS (Mac)
Hi guys,

I need a 20 sec countdown in my game, I know how to work with timer (thanks tshirtbooth) but I need my numbers with my custom font, I´ve made 20 pngs and named them 1.png, 2.png etc, what’s the best way to display my custom numbers making them change to the following number as the countdown runs? Thanks for your help!

Comments

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    edited February 2012
    you only need digits 0 - 9 why nd 20?

    I have done that in my recent game as well.
    Let me search for the thread
    http://forums.gamesalad.com/discussion/38935/custom-font-timer-problem#Item_16
  • TwilightHunterTwilightHunter Member Posts: 146
    edited February 2012
    You could just have the actor with the timer be the actor that animates. Just have the actor change it's image every second.
  • franken2778franken2778 Member Posts: 54
    Thanks guys, TwiligthHunter could you please explain a little bit, ok I have the timer and I I have a display text actor who is displaying the timer, what can I do to make it display the rigth image every second, I mean to display my custom numbers instead regular numbers? GLGames example is more complicated for me but I'll keep on studying it. Thanks for your help
  • franken2778franken2778 Member Posts: 54
    Thanks again tshirtbooth, I'll watch it again and try to adapt it to my countdown timer, man I have been working a lot in this and I feel overwhelmed, I need to finish this game before sunday and things are getting harder due to the pressure my mind is blacking out already, any email address I can email you tshirtbooth if not a problem?
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    edited February 2012
    use the rule i wrote in my thread


    floor(( game.Timer %100)/10)..".png" (1st digit Sec)
    floor( game.Timer %10)..".png" (2nd digit Sec)

    And game.timer is just every 1 sec -1 to itself.
    each rule will tied to a individual 0 image for the counter
  • franken2778franken2778 Member Posts: 54
    Thanks GLGames, so I need to follow all instructions given by tshirtbooth on his video right?
  • franken2778franken2778 Member Posts: 54
    Can't make it work guys, I need more experience with gamesalad; do you know a simpler way to do this, I don't know probably a countdown timer changing images ? sorry to bother but I hope someday I'll become as good as you :-<
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    Can't you simply stick all 20 numbers into an animate behaviour and put the frame rate on 1 fps ?


    . . . .as simple as this . . .

    image
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    lolz that might work but you have to time it closely so that it ends together with the actual count down timer.
    Here's my demo
    https://www.amazon.com/clouddrive?downloadById=be7b9c4e-4f9b-4102-9dc5-fe67a12ae235&attachment=0

  • franken2778franken2778 Member Posts: 54
    Thank you Tynan, that's way easier. GLGames that looks great and you make it seems simple, can't download the file, link just redirect me to my account at cloud drive but no downloadable file there. Thanks for checking my friend
  • mmzbrmmzbr Member Posts: 311
    @GLGames Great Template. Could you share the file in another server than amazon?
  • CloudsClouds Member Posts: 1,599
    @GLGames

    "lolz that might work"

    It works just fine.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    @ tynan

    Itll work if your not dynamically changing the amount of time in the timer, the duration of the countdown, and the direction of the countdown.

    What glgames has is spot on, and its not as difficult as it seems. You just make sure your number images are 1.png,2.png and ect.

    Then you just have separate actors for each digit and constrain its image to the corresponding expression.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @JohnPapiomitis

    "Itll work if your not dynamically changing the amount of time in the timer, the duration of the countdown, and the direction of the countdown"

    As franken2778 says in the OP, he needs a 20 second countdown, he makes no mention of this countdown dynamically changing, changing 'direction', changing duration (or any of a thousand other possibilities) ?

    He has 20 PNGs that he needs to step through, 1 second each, the animate behaviour seems the most straightforward way as far as I can see, no attributes, no constraints, no rules as such, no separate actors (etc).
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited February 2012
    I know, i was pointing that out in case others read this and are wondering what the point is off doing it the other way, and if he needs that down the road.

    cheers
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @JohnPapiomitis

    "I know, i was pointing that out in case others read this and are wondering what the point is off doing it the other way, and if he needs that down the road."

    Yes, of course, GLGames method is vastly more flexible / applicable. I was responding to this:
    ". . . I need more experience with gamesalad; do you know a simpler way to do this . . . "

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Sorry i nd to find any server to share the file from
    , my way works with any amount of integer count up or down the custom fonts will work.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Hope this download links works for you guys
    http://www.4shared.com/zip/ITShV-yB/Countdown_Demo.html?
  • mmzbrmmzbr Member Posts: 311
    @GLGames

    Worked now, thank you very much!
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    glad it helped.
  • konpavloskonpavlos Member Posts: 17
    edited May 2012
    Nothing you post works @GLGames sad but true
  • Fabri DamazioFabri Damazio Member Posts: 97
    Hey guys.

    1- create a interger called time

    2- create 2 actors and use constrain attribute. Constrain SELF.IMAGE TO
    actor 1: floor(( game.Timer %100)/10)..".png" (1st digit Sec)
    actor2: floor( game.Timer %10)..".png" (2nd digit Sec)

    3- make another actor called "time controller"

    4- create a rule with timer and change attribute:
    while time > 0
    every 1 second
    change attribute game.time to game.time-1

    5- Put your actor on a scene.
Sign In or Register to comment.