Saving Score Bug?

AlfredchickenAlfredchicken Member, PRO Posts: 11
edited November -1 in Working with GS (Mac)
Hello,

i have a problem.
I have made a Score and it works. When you died there will be a Scene in which you can go back to main menu. On main menu (a scene) is the highscore object with folling:

load attirbute:
key: highscore Attribute game.highscore

display test
game.gamescore

Ok that works fine. But when i play again the Score in the game will be the actually HIGHSCORE. and if a make this on the button for play:

Change Attribute:
game.gamescore to 0

the highscore will also be resetet? can somone help me?

Thx :)

Comments

  • synthesissynthesis Member Posts: 1,693
    use separate attributes...one for gamescore and one for highscore.
    At the end of the game...

    Rule:
    when gamescore > highscore...
    highscore=gamescore
    saveAttribute highscore (puts it to memory)

    timer
    after 1 second...
    activate a button to continue on (such as return to main menu).

    when button touch is pressed
    gamescore=0
    go to main menu scene
  • AlfredchickenAlfredchicken Member, PRO Posts: 11
    i did it so. But i wont work. :(
  • synthesissynthesis Member Posts: 1,693
    it should...
    try rebuilding it from scratch.
Sign In or Register to comment.