How to resume game after exiting?
ancch
Member, PRO Posts: 103
If my game has 50 scenes, how can I allow a user to exit the game and return to the game later at the last played scene?
Comments
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
I used "Change Scene", but there is no option for me to change to the last scene played before exiting. Only available options are previous scene and next scene...
Then in your continue game button, you use Load Attribute Behaviours, loading in all of the attributes saved at the last place in the game. Finally, Rules showing if attribute is Lev3, go to level 3, etc.
This last bit you asked about only, but thought I'd give you more info in case you didn't know. Anyhow, hope it helps.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
www.marcosriffel.com
To amend & clarify what I was trying to say above, I think you'll only need 1 Save Attribute for the level saved, called LevelSave for instance, any key you like. With the continue Button, Load LevelSave, and if it's 1 then go to level 1, if it's 2, then to level 2, etc. Before any of these, load in any other changed atributes as well.
:-)
Edit: written much of what design219 said....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
www.marcosriffel.com
Anyway I guess I saying the same thing everybody else is saying
It should be something like this. You first need to create a global attribute named SCENE. It needs to be an integer.
Each scene should have one actor with the rule:
Change attribute SCENE to 47 (or whatever the scene number is).
Save attribute SCENE
You really don't need a button for the save part, just add it to the change rule, but make sure it comes after the change scene number attribute.
This will make sure you game is always saving the latest scene.
Now when someone relaunches the game, you could have a button actor that will take a player to the last scene played. It's will need a rule for each level, but you can copy and paste and then just change the number. It should look sort of like this:
If attribute SCENE is 1
Change scene to 1(or the whatever you have named your scene 1)
If attribute SCENE is 2
Change scene to 2(or the whatever you have named your scene 2)
And on to 50.
There might be a simpler way, but this will work.
Best of luck!
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
Actually maybe more of a shortcut to avoid having to put an instanced actor in every scene.
http://gamesalad.com/forums/topic.php?id=6824#post
http://gamesalad.com/forums/topic.php?id=6824#post
It will not work in the GameSalad Preview or in the GS Viewer.
Test your game on the GS Viewer - play it, shut it down etc.
Then go back into the GS Viewer, click 'recent games' - play the game you just tested.
Your attributes will work just fine.
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
That GS Viewer keeps getting cooler!
Thanks QS!
I have various iterations of my games - so
Project K 1-1
Project K 1-2
etc etc
as I add new features, I save as a different version.
Therefore, any save data is lost as you've effectively made a new game with each version.
Now, one way to keep checking the save variable changes across all versions would be to save out a copy of your game as a test.
So, I'm on Project K 2-3. I test it, get a certain way through, and it saves the data,
I then make Project K 2-4, and the save data is gone from 2-3.
So, save as Project K TEST - and you should retain all the save data from previous versions as you're always testing that version.
Make sense?
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
You just press the icon on your iPhone, and 'iPhone' graphic appears next to the big green arrow in GameSalad.
You just click that to send to your iPhone, and it's there in your hand.
Possibly one of the most wonderful things you'll ever see
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Right, I'd better get back to the neighbours' barbeque; only came back to feed and water the dog; then inevitably fell asleep for an hour and a half...no more burgers for me, then...
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps