GameSalad

Changing timer

eligameseligames Posts: 21Member, PRO

How would I change a timer from 1 to 2 when I press a button and when I press it again it goes up to 3 and so on...

Comments

  • tatiangtatiang Posts: 10,916Member, Sous Chef, PRO, Senior Sous-Chef

    Make an integer attribute called game.myTimer. Then add these rules to your timer actor:

    Timer every 1 second
         Change attribute game.myTimer to game.myTimer-1

    When touch is pressed
         Change attribute game.myTimer to game.myTimer+1

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

Sign In or Register to comment.