can someone explain how to save a high score and display it on main page?
tollhousestudio
Member Posts: 166
Hey folks, exciting to have the new save feature, this changes everything I have done with gamesalad.
For now I just want to update my game "Earth Control" to have a high score.
Can someone help me out cos I'm not sure how it works.
I have a game over screen when you die that displays your high score, I thought I could put the save attribute on that and on the main menu have a load attribute but its not working and I'm not sure if this is right at all.
For now I just want to update my game "Earth Control" to have a high score.
Can someone help me out cos I'm not sure how it works.
I have a game over screen when you die that displays your high score, I thought I could put the save attribute on that and on the main menu have a load attribute but its not working and I'm not sure if this is right at all.
Comments
You have your attribute: HighScore
At the end of your game, so when you die, or you reach the end of a level you use the save attribute behaviour like so:
Save:
Attribute: HighScore.game (saving the high score attribute).
Keyword: HighScore (Keyword being a reference to the saved attribute).
Then when you press your button to goto the high score screen or when it loads use the load attribute behaviour like so:
Load:
Keyword: HighScore
Attribute: HighScore.game
As you can see both the attributes of the load behaviour are the same as the save behaviour you used before. Now in your high score screen you would use a Display Text behaviour to include the following.
Display Text:
HighScore.game
Quite simple, now this should load your high score attribute and then display it. I think it should work but I haven't tried it. Say if you have any issues, I will do my best to help as Im sure others will as well.
Like If I score 250 and that would stay like that until its above that score.
just check to see if the current high score is higher than the saved high score. If so, overwrite the saved version.
so, load the saved high score into an attribute
then create a rule
if currentHighScore is larger than savedHighScore
save currentHighScore
otherwise
save savedHighScore
something like that anyways
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left