Saving Score Bug?
Alfredchicken
Member, PRO Posts: 11
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
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
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
try rebuilding it from scratch.