High score not saving.
I'm sure I'm missing something obvious, but another set of eyes might help me out with this one
Here is how I am saving my high score. I am using a game.HighScore attribute to save to key highscore.
Here is how I am loading my high score. Within a "loading" transition screen in-between scenes, I have the high score loading attribute. I thought this may work, for everytime the user presses retry, the transition screen quickly appears before the scene and updates the high score for each new round.
What I have setup seems to work inside the game. Every new round, the high score is updated. However, when I close out the GS Viewer and reopen, the high score starts back at 0...
How would I go about having the high score stay where the user left off before closing the game?
Hope this makes sense and thank you!
Comments
I think that every time the viewer opens it acts like it is playing the game for the first time. I could well be wrong, but I think it should be fine once it is published. Anyone, am I wrong?
@frd I thought the same thing as well. But when saving/loading other attributes, such as an in app purchase, then closing/reopening the GS Viewer, my purchased attribute was saved...
So I'm a little confused as to why my high score att. isn't doing the same
Anyone, get a chance to look at this? Been trying things all day and still can't figure it out...
Im not sure about the viewer, but does the highscore stay saved when you click on the restart button?(which is equivalent to exiting and reopening the app), if it does then you are good, if not then try redoing the rules again.
Fortuna Infortuna Forti Una
Are you sure it isn't working? That looks perfect. I just looked into my game and it looks the exact same.
Thanks for the reply guys.
@Lovejoy Unfortunately, the score doesn't stay saved when I hit the restart button...
@tappwaterGames Yeah, I've read over this code hundreds of times and can't find what's wrong.
But, I'm sure I'll get it! Thanks again.
I'm having the same issue. If anyone finds a solution let me know! It would be greatly appreciated!
@Saridus2012 Have you tested this on an actual device? If you're having "the same issue" be sure to post a screenshot of your rules. It may be that your rules look the same but actually aren't.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Did you open the expression on the load when entering the key? Be sure just to type it in without opening.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS