save the best score

patapplepatapple Member Posts: 873
edited March 2012 in Working with GS (Mac)
Hi,

I'm working on a system with the stars. I have a level that the player must finish in the minimum time possible. At the start of the game the record is 0. When the player finish the level there is a rule:

if "game.finishLevelScore" is less than "game.bestScore" --> change "game.bestScore" to "game.finishLevelScore"

but the best.score is 0!!! and It never work! I know what is the problem but I don't have any idea how to fix it.

thanks for help

Best Answers

  • MantoManto Posts: 796
    edited March 2012 Accepted Answer
    Shouldn't it be:

    if "game.finishLevelScore" is greater than "game.bestScore" --> change "game.bestScore" to "game.finishLevelScore"
  • MantoManto Posts: 796
    edited March 2012 Accepted Answer
    Ahh yeh. What if you set the game.bestScore to enough large number?
  • tatiangtatiang Posts: 11,949
    Accepted Answer
    Ahh yeh. What if you set the game.bestScore to enough large number?
    There's your answer.

Answers

  • patapplepatapple Member Posts: 873
    No, beacause the goal of the game is to complete the level with the lower time possible! If i complete the level in 5 seconds, and then i complete the level in 4.5 seconds, this is the best score.... ;)
  • patapplepatapple Member Posts: 873
    YES! I did that but i forgot to add a rule! now it's work. thanks to all
Sign In or Register to comment.