High score isn't working
jacob717
Member Posts: 9
Okay so I have a score integer that keeps track of the score as I play, then I have a final score that shows what I got on that round. what I am wanting to do now is to create a high score text that is displayed on the start screen and disappears when the game begins. I have the text working, it shows and and doesnt show when it is supposed to, however the high score integer stays at 0. This is the rules I have
if game.score > game. high score,
Change attribute game.highscore to game.score
Save attribute - game.highscore
When game.playing is false
Display text "High score: ".. game.highscore
The text rule is working, but the integer stays 0 for high score and won't display the highest score achieved. How can I make this work? Thanks
Comments
From your post it seems like it should be working. Can you post a screenshot of how your code is set up?
You may want to place the change attribute as well as the save attribute behaviors inside a 0.1 timer (run to completetion) to ensure that it fires.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX
http://imgur.com/xlQqKeQ
You have it set to every 0.1 seconds, so its most likely changing it over and over.
Fortuna Infortuna Forti Una
@Lovejoy I just got it to work
Thankyou to both of you though!
What did you end up doing to make the highscore save even when you exit and reopen the game? I am having the same problem and would like to know what you did to end the frustration.