GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Saving high scores

Hey,
I have set a high score attribute that is being saved everytime it gets changed or is being loaded. Throughout my game, the high score stays the same, so theres no problem. But, when I'm testing with an ad hoc and I close the game and delete it from the multitasking screen, the high score gets set back to 0. Is this normal with an ad hoc? If not, please let me know how to solve this.

Comments

  • uptimistikuptimistik Trinidad and TobagoPosts: 3,359Member, Sous Chef, PRO
    All it means is that you've missed something that is found in this video. Most typically is an incorrectly spelt key name .

  • anatomyofdreamsanatomyofdreams Posts: 721Member
    @vincentW have you also made sure to LOAD the attribute upon game launch or scene launch?
    Thats a crucial step!
  • vincentWvincentW Posts: 47Member
    @anatomyofdreams
    Yes there's a display text actor to display the high score, and that one loads the attribute.
    So that's not the problem.
  • JamieOneilJamieOneil Posts: 871Member, PRO
    Could you possibly post a screenshot of your "save" and "load"? This will make it much easier to solve the problem if it has not been already.

    Make sure the "key" is the same in both the save and load.
  • darrelfdarrelf Posts: 231Member
    edited September 2013
    @vincentW Would it be feasible in your project to save the score to a table? On your home screen, you would load the attribute with the table value. If using nightly builds, you wouldn't need to use the attribute at all.
    I personally prefer this to load/save attributes but each to their own...
  • anatomyofdreamsanatomyofdreams Posts: 721Member
    @vincentw if the load/save key is the same and you've checked, then you may want to try and force the load attribute to fire.
    Example- put it in a timer that says after .1 seconds LOAD attribute.
    You can also try to make sure that your load actor (i believe you said its in a display actor) is one of the first things to load in the scene. If you look at your layers in the scene via the layer menu, the bottom most actor acts as the first load and then goes up the list.
    If none of this works it may be a bug. I doubt it though. Perhaps you should share your code on here via screenshot. Good luck!
Sign In or Register to comment.