GameSalad

Countdown timer question

whycaliwhycali Posts: 87Member, PRO

GS Forum,
I currently have a Rule for my timer.

Rule:
game.timer > 0
timer every 1 second run to completion
change game.timer to game.timer-1

works great.
but i want to be able to stop the timer when level is finished and what ever the remaining number is make that add bonus points/score.

How would one write a rule for that?

Thanks for all your help on this.

Comments

  • tatiangtatiang Posts: 11,310Member, Sous Chef, PRO, Senior Sous-Chef
    edited June 19

    When attribute game.levelFinished is true [or however you determine the level is finished]
         change attribute game.score to game.score + game.timer
    Otherwise
         timer every 1 second run to completion NOT CHECKED
              change attribute game.timer to game.timer-1

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

  • whycaliwhycali Posts: 87Member, PRO

    @tatiang Thank you for your help. Makes perfect sense now just wasn't thinking outside the box lol.

Sign In or Register to comment.