How Can I Only Save Score When Higher Than Previous?
JoshKahane
Member Posts: 470
Hi
Its another one of those days where I am clueless. Hope you guys can help as you always do. I have a score which saves after each time I die but how can I get it to save only when its higher than the previously saved score? So essentially how do I save a high score?
Thanks.
Its another one of those days where I am clueless. Hope you guys can help as you always do. I have a score which saves after each time I die but how can I get it to save only when its higher than the previously saved score? So essentially how do I save a high score?
Thanks.
Comments
Create a rule if game.score is > or = game.highscore
Constrain attribute: game.highscore to game.score
Then create the save and load attributes as necessary and make sure in your "key" that the keyword matches the attribute EXACTLY as it is typed out including upper and lower case, and spacing if it's there
My high score wasn't working properly, and now it is! Simple mistake to make, but you put me on the right track!
'Constrain' indeed!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
It took me a day to figure that out, it was really weird, I couldn't figure out for the life of me why it wasn't working, then poof! Constrain attribute was the answer!
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
How do I reset the game.score but not the game.highscore when I want to reset the scene?