Reset Game Issue

921creative921creative Member, PRO Posts: 140
edited December 2011 in Working with GS (Mac)
I'm unable to get my game to reset when a button is pressed. I have an options screen with a "Reset Game" button. When the button is pressed, it pauses the game to overlay a "confirmation" screen with "Yes, Reset" and "Cancel" buttons. I may already have the answer--is it because the game is Paused at the time the user confirms the reset? It does go to the Initial Scene as it's supposed to, but all the saved attributes are still being loaded so I know the game isn't resetting.

Comments

  • 921creative921creative Member, PRO Posts: 140
    Nope, I can confirm it's not the fact that the game is paused. I changed scene rather than paused and the game still did not reset. Frustrated!
  • 921creative921creative Member, PRO Posts: 140
    OK, seriously, no matter how I try, I cannot get my game to reset! Does anyone else have this problem? Shouldn't resetting the game restore all game attributes to their original settings?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hi,
    When you want to reset the game, when they press yes you have to change ALL the attribute used for the game back to their original setting.
    So if level was at 1 when the application started for the first time, you have to change it back to 1.
  • 921creative921creative Member, PRO Posts: 140
    I'm confused then. What is the point of the Reset Game Behavior if it doesn't save you the work of changing all the attributes back?
  • GhostShipAppsGhostShipApps Member Posts: 81
    edited December 2011
    When you reset the game it will change back all the attributes. But when you save an attribute my understanding is, please somebody correct me if I m wrong, you are telling the game to not change that one. That is the point of saving attributes.
    Let say you saved an integer in 3, when you reset you game it will go back to the number it was when you saved it because......... you saved it!
    I think you can do what Brydon is saying, when touch is pressed change all the attributes you saved to their original setting, but in my opinion you should examine if you really wanted to save the attributes in the first place. cheers.
  • 921creative921creative Member, PRO Posts: 140
    Thanks. I need to save high score values for every single level so yes, I do need those attributes saved. And then change them all back to 0 when the game resets.

    My question remains...what is the point of the Reset Game behavior? I understand Reset Scene. Does Reset Game reset all scene attributes? In that case maybe the behavior should be called Reset All Scenes.
  • 921creative921creative Member, PRO Posts: 140
    OK I changed it so all the attributes get changed back to their original settings when the reset button is pressed. Tested it, it still does not work. All the saved attributes remain unchanged. Now I'm wondering if it's necessary to resave all the changed attributes upon a game reset. I don't get this at all. Why isn't there any explanation in the (limited) GS documentation about how to properly reset your game and all its attributes?
  • 921creative921creative Member, PRO Posts: 140
    Just found this tidbit: Reset Game: “Resets the game and all the scenes in it. This will restore all attribute values to their original state, but will not delete keys saved using the “Save Attribute” behavior.”

    Someone help me out here...so if, when doing a game reset, I save all the stored keys' attributes with their associated attributes' default values, will this officially reset the game for me?

    Dear GameSalad, please give us an easier way to wipe out the stored keys! It seems like resetting the game should do this since keys get re-saved throughout the course of gameplay anyway.
  • JayReiterJayReiter TexasMember Posts: 88

    @921creative - I see you posted this a few years ago. I'm just now getting into the "reset game" issue myself. I'm putting the finishing touches on my first game. Did you ever figure all this out? Can you give me some tips/advice here? Thanks.

Sign In or Register to comment.