Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Countdown timer question

whycaliwhycali Posts: 87Member, PRO

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

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.


  • tatiangtatiang Posts: 11,717Member, Sous Chef, PRO, Senior Sous-Chef
    edited June 2018

    When attribute game.levelFinished is true [or however you determine the level is finished]
         change attribute game.score to game.score + game.timer
         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.