save progress

Hello everyone, I arose the problem of how to save your progress during a game x not have to start from the beginning once you exit from iphone app.
I would also like to know how to do the checkpoint so that when the level if you are killed you have to start from the beginning but from the last checkpoint activated.
I already found something here on the forum, but I did not understand, I need you
would be a practical example or tutorial if possible
I hope I can help.
and sorry for my english.
I would also like to know how to do the checkpoint so that when the level if you are killed you have to start from the beginning but from the last checkpoint activated.
I already found something here on the forum, but I did not understand, I need you
would be a practical example or tutorial if possible
I hope I can help.
and sorry for my english.
Comments
You need to use the Load and the Save Behaviors.
So at a checkpoint in your game, for every attribute that needs to be remembered, used a Save Attribute Behavior in an actor. Each needs to have its own key: this is anything you like, to identify it and so link it with the Load Behaviors.
Next, before your game begins, or preferably in a Continue button (leaving the New Game just to go to the first scene), put a Load Behavior, one for each of your Save Behaviors. Make sure to use all the same keys as the keys you've put into the Save Behaviors. Don't forget to put a load Behavior with the attribute for going to which scene. Then which value goes to which scene:
Load game.AttForScenes Key: yourKey
When game.AttForScenes = 1
Change Scene: scene1
When game.AttForScenes = 2
Change Scene: scene2
etc.
Important to note: if you quit GSC on the Mac and run the game file again, it won't load any attributes and so will start from the beginning again. But they will register on the device via the Viewer or an ad hoc.
I hope I've explained clearly enough!
----------------------------------------------
http://davidgriffinapps.co.uk/
iPad: End of the Earth game coming soon to the iTunes App Store....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Another option which is more straightforward is to have your checkpoints at the end of each level. This way, you just need the one attribute, called LevelSaved for instance. And so the one Save Behavior at the end of each level. For each level, the appropriate Load Behavior. Note though that if you stop playing mid-game, switch off, on again and start playing again, then press continue, it'll start at the beginning of the level again.
So to save finished levels only, use the system I suggested above in a Continue button:
Load attribute game.LevelSaved key: LSaved
Rule: When game.LevelSaved = 1
Change Scene Level 2
Rule: When game.LevelSaved = 2
Change Scene Level 3
etc.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
not clear to me ......
Not each actor, but yes, each attribute associated with the actor, if you want to save progress mid-level, and come back to that exact point mid-level after restarting the game.
"and if I have the same actor that is repeated 10 times before the mid-level checkpoints, I can create only one attribute save?"
The values of the actors attributes can change as many times as you like before a checkpoint. You only save the final values of the attributes at each checkpoint.
Hope that's clearer for you.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps