Score based on time?

tcla75tcla75 Member Posts: 71
edited November -1 in Working with GS (Mac)
Hi all. I have a score actor set up in my scene displayed at 0 but all the tutorials I've seen so far need some interaction to be made with an actor (Like blowing up) to advance the score. What I'm trying to do is have the score increase the longer you survive in the game. So from when it starts to game over the score would run up and stop at game over. Also if its possible to be able to double the amount of the score every 30 seconds. Is this possible?

Comments

  • StusAppsStusApps Member, PRO Posts: 1,352
    You will need a game.score attribute and a self.addition (both integer). Make self.addition to be a value of 1.

    timer:
    every 1 seconds
    change attribute: game.score to game.score+self.addition

    timer:
    every 30 seconds
    change attribute: self.addition to self.addition*2
  • tcla75tcla75 Member Posts: 71
    Thanks that works a treat now the only problem I am having is when the game over screen pops up the score keeps on going. How would I stop it.
  • tcla75tcla75 Member Posts: 71
    What I mean to say is what can I do to stop the score as soon as the game over actor pops up on the screen?
  • StusAppsStusApps Member, PRO Posts: 1,352
    you would need perhaps a boolean attribute called say 'gameover' that becomes true when the gameover over actor appears then put that first timer from the previous rules in a rule that says if game.gameover=false
  • tcla75tcla75 Member Posts: 71
    Hi thanks for getting back to me. I tried what you suggested. I'm still new to this so I'm not sure if I did it right. See screenshot. If I did then it hasn't stopped the timer at game over.

    http://img59.imageshack.us/img59/9819/screenshot20110322at164.png
Sign In or Register to comment.