Display High score
http_gamesalad
Member Posts: 1,340
For some reason my highscore isnt working properly this is what I have.
If game.score > game.highscore
change attribute game.highscore to game.score
I also want to display something when you get a new highscore like flappy bird does..
So I said game.highscore = game.score
do display highscore image
Comments
I found out cause when I was playing a game my score was 270 but my highscore displayed 247... so I knew I had a major bug
A major bug is something inherently wrong with the software. What you're describing is most likely a mistake in coding. Can you post a screenshot of your rule?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang its something wrong with my coding
That rule looks correct. Can you send me a link to download the file (make sure to .zip it first)? The problem may be with the way you are displaying the attribute or whether or not the actor is actually on the scene or any number of other causes.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang this is the rule I put for it to display "best" score whenever you get a new highscore
That rule will only fire when game.Highscore is exactly equal to game.Score. I'd have to see the project file to know how this all fits together. I can't really understand the purpose of that rule (is it on the high score scene or the gameplay scene, what goes game.Spawn Text Wh... have to do with it, how have you troubleshooted this with Log Debugging Statements and Display Text statements, etc.?).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang okay you know when you play flappy bird & you beat your old score how the it says "new" best. But the "new" only shows when you beat your score score... that's what I want to happen.. So how would I get that to spawn when you get a new highscore?
http://tinypic.com/view.php?pic=zknzty&s=8
Probably the way you have it set up but again, it's just hard to know because there are so many factors. If you post a screenshot of something and it looks correct but isn't working or has other conditions that aren't clear as I mentioned before, then that means there is something you're not showing us that is causing the problem.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I know you're using a PC so this may not be so helpful but here's a demo that shows how this can be set up. There are ways to convert Mac Creator files to PC (Google it ).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User