When destroying 4balls time wont stop!

EXLCEXLC Member Posts: 10
edited March 2014 in Working with GS (Mac)
Hey there ppls,

I making a simple game just to get the hang of it. The objective is that to destroy 4 balls before the time ends. My problem is that when you acomplish destroying the 4 balls you win but my time keeps runing and when it reaches 0 it says YOU LOSE. How do I apply that rule or attribute in my game. So when I destroy the 4 balls the timer stops.

Please Help
EXLC
Thank you

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    First, please only create one thread for an issue you want help with. Second, 99% of the posts here are from people wanting help with their rules. It helps if you can be specific when you title a new question/discussion.

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

  • EXLCEXLC Member Posts: 10
    Yes thank you I'm going to delet the other post , I was looking for the right place to place the post. OK i'll do it next time. can you help?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @EXLC,

    Make an integer att., call it Count. Make another attribute, a boolean, let's call it Run.

    So assuming you want this timer to start the moment you enter the scene, set Run to true.

    Rule: When Run is true
    Timer rules run to completion unchecked

    Now in each of the ball actors, add, just before the Destroy behaviour,
    Change Attribute Count to Count+1
    When Count = 4
    Change Attribute Run to false

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.