How to make a clock running down?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
How do I show up a clock running down from 10 seconds to zero.

For a time limited level...

Comments

  • zellhuangzellhuang Member, PRO Posts: 79
    hey ,buddy ,thats supper simple.
    1)add an attribute(real) named "time" or whatever u like,and set it to "10"

    2)add an actor named "time limit", double click it and drag a "timer" behavior to it setting "every 1 second" ,remember the "Run to Complition" box need to be selected.

    3)drag a "display text" behavior to it changing text to the attribute u added just now (named "time")

    4)drag the "time limit" actor into your scene or give other actor a rule to spwan the "time limit" actor whenever u need it to pop up.

    P.S. I think u have known how and when to destroy the "time limit" actor :) If not, add another rule to the "time limit" actor. This rule should be "time" attribute = 0. Then drag a "change attribute" behavior under it to change the "time" attribute to "10" and drag a "destroy actor" under it, too.

    hope that will help u :)
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Doesn't work ://

    Every second, the number 10 shows up for a short moment and thats it :///
  • zellhuangzellhuang Member, PRO Posts: 79
    Alex0407 said:
    Doesn't work ://

    Every second, the number 10 shows up for a short moment and thats it :///

    sorry,I forget one thing:
    2)add an actor named "time limit", double click it and drag a "timer" behavior to it setting "every 1 second" ,remember the "Run to Complition" box need to be selected.drag a "change attribute" behavior changing "time"attribute to "time"-1 under the timer behavior .

    I'v tested this method,it work :)
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okay works but one thing is really uncool :/ the number shows up and then it gets unshown...is it possible to look it like a digital stopwatch running down?
  • zellhuangzellhuang Member, PRO Posts: 79
    Alex0407 said:
    Okay works but one thing is really uncool :/ the number shows up and then it gets unshown...is it possible to look it like a digital stopwatch running down?

    u should watch the tutorial video named "Scorekeeping, part 3 (Custom Font Numbers) for iOS Games made with GameSalad" on Youtube posted by Tshirtbooth. This video teaches u how to make the number displayed to be cool :)
    I'm sorry to say that I cann't give u this video's url right now, because my country's firewall blocks Youtube, so I cann't open up Youtube right now :( That sucks~~~
    I think if u search that title on Youtube, u will find it :)
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okey other idea. When my clock is down from 10sec and my collect attribute is not 3, I want to Display game over and show up a restart button. How to do that?!
  • zellhuangzellhuang Member, PRO Posts: 79
    Alex0407 said:
    Okey other idea. When my clock is down from 10sec and my collect attribute is not 3, I want to Display game over and show up a restart button. How to do that?!

    maybe we can communicate according MSN, that should be efficient.
    If u got MSN, add me to your friend ,and we can talk about GS according instant message. my MSN account is zellhuang1986@hotmail.com
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Didi it :D but thank you ....just need some help with the scenes :)
  • zellhuangzellhuang Member, PRO Posts: 79
    Alex0407 said:
    Okey other idea. When my clock is down from 10sec and my collect attribute is not 3, I want to Display game over and show up a restart button. How to do that?!

    u just need spwan two actors in the rule when clock is down from 10sec and collect attribute is not 3. One of the actor is for display "Game Over" text, and the other one is "Restart" button :)
    Just use the "Spwan" behavior
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Sorry my mistake...I was talking about the other thread where you tried to help me :)
Sign In or Register to comment.