Save attribute survive Reset Game?

GamePizzaGamePizza Member, PRO Posts: 227
edited November -1 in Working with GS (Mac)
I'm using save and load attribute to save the high score. But after calling Reset Game, I don't receive the saved high score any more from loading. Does save attribute work even after calling Reset Game?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Yes Reset Game Should not delete you saved attributes. But you have to have something loading those saves on the first scene of your game if you want them to come back.
  • GamePizzaGamePizza Member, PRO Posts: 227
    do I actually have to change scenes for the attribute to load? Can it load without changing scenes?
  • BlackbirdStudiosBlackbirdStudios Member Posts: 493
    GamePizza said:
    do I actually have to change scenes for the attribute to load? Can it load without changing scenes?

    You could have an invisible actor off screen managing this no problem, what tenrdrmer is saying, is that you should have a scene at the beginning of the game that loads all of these score attributes. It could be something like a splash screen, etc. And just place an actor that loads the attributes.

    Hope this help

    -Matt
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You can load the attributes anywhere you want. But reset game will also send you back to the very first scene in your game. So the first scene is generally the best place to load but you can load them anywhere you want. they just will not be available until they are loaded.
  • GamePizzaGamePizza Member, PRO Posts: 227
    ok I understand and have made the changes, but my high score function would only seem to work as long as I removed Reset game and just made all the changes manually by myself rather than resetting the game.

    Also, testing it in GS Viewer on my iphone did not work. As soon as I close GS Viewer and start it again and play the Recent game, the high score has been reset to 0.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Sounds to me like you are not using Save and load properly. Make sure your keys are 100% identical

    And a unique key for every attribute being saved
Sign In or Register to comment.