Save Game State

appeuphoriaappeuphoria Member Posts: 9
edited November -1 in Working with GS (Mac)
I am making a game for the iPhone. My game has various levels. I am wanting the player to have the option of starting at the last level they achieved so they do not have to start at the very beginning.

For example: Player passes level 1, 2, 3. When they load the game next time, they have the option to play fresh or start at level 4.

I am new to gamesalad, and would appreciate some simple help. I have tried the documentation, but some human interaction and help would be greatly appreciated.

Thanks!

Comments

  • design219design219 Member Posts: 2,273
    You would need to make an attribute named something like "levels".

    As you enter each level, you would want to change the number of the attribute "levels".

    You would also need to set a timer in the same rule to after .1 seconds, save the "levels" attribute. So what you are doing is entering a level, changing the level number and then saving it.

    Back on your menu, you would want to load the "levels" attribute every time the menu opens, so then you could have a button with the option of going to last level. This button would need rules like, if attribute "level" = 2, go to scene 2, if attribute "level" = 3, go to scene 3, etc.

    Hope that helps. There are probably many other ways to do this. Good luck!

    _______________

    Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
    Food Fight! http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
  • appeuphoriaappeuphoria Member Posts: 9
    Thank you for your helpfulness! I understood the setting a timer in the same rule part, but i am kind of confused on this part:

    "Back on your menu, you would want to load the "levels" attribute every time the menu opens, so then you could have a button with the option of going to last level. This button would need rules like, if attribute "level" = 2, go to scene 2, if attribute "level" = 3, go to scene 3, etc."

    Thanks again for your help!
  • chosenonestudioschosenonestudios Member Posts: 1,714
    what he's saying is when your game boots up it would have to check what the last level you were on was, so you use the load attribute to load your saved "levels" and then whatever number loads is 1,2,3,4,5, etc 1 = level 1 2 = level 2 etc. Hope this helps!
  • appeuphoriaappeuphoria Member Posts: 9
    Thank you so much for your help! I appreciate it!
  • chosenonestudioschosenonestudios Member Posts: 1,714
    yep don't worry about it!
Sign In or Register to comment.