Start button issue

kajutokajuto Member Posts: 314
edited March 2012 in Miscellaneous
hi there! i have a timer, and the code i used is this:

Display Text
-floor((floor(game.mytimer%3600)/60%10))..":"..floor((game.mytimer%60)/10)..floor(game.mytimer%10)

Change Att
-game.startime to game.time

Rule
-att game.mytime >0
-constrain att
-game.mytimer to 120-(game.time-game.starttime)

Rule
-att game.mytime =0
- Timer
-after 2 seconds run to completion
- pause game

how can i set the timer to start , when i touch the start button to start to play?????

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Make an attribute called startCountdown and have it set to false

    In your start button have when touch is pressed, change attribute startCountdown to true

    then have your rules for the timer in a rule when attribute startCountdown is true

    cheers
  • kajutokajuto Member Posts: 314
    i already created a boolean attribute with a checkmark called StartCountDown, in the timer i put a Change Att but it didn't work..
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

Sign In or Register to comment.