Load and Save Attribute Question
galasea
Member Posts: 17
Is there a way to save a high score so that it loads after the game application has been closed? I used the save and load attribute behaviors as demonstrated in TShirtBooth's video () to have my game save a persistent high score value that starts at zero but then is updated each time a new high score is reached. I then loaded my game adhoc onto my iPhone 4 to test it out. The load and save attribute behaviors work as long as I don't close the app, but when I close the app and reopen it, the high score value resets back to zero. How can I get my game to save the high score after closing?
Comments
Hope this helps!
On my loading screen, I have a hidden actor with the load attribute behavior that loads the high score key, although I don't have any rules or whatnot to govern the load attribute behavior. Do you have any recommendations for improving that?
Current score is 20 my high score is 40.
Suddenly i get 41.
If current score (41) is higher than high score (40) then change attribute high score (40) to current score (41). Then save high score (41).
Now load high score (41) so as to update the display in the current scene.
(This should all be inside the one rule of "if current is higher than high score than xyz...")
The load was triggered by the save. When it saw that the current score was higher than the old high score, it not only saved it, but ensured to RELOAD the new save file so it could be updated and displayed.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
yes it does work, but this thread is so old the information contained might be bad. better opening a new thread.
make sure you're not typing your keys into the expression editor (little e), they should be typed directly into the box.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left