How to save and load a scene?

robertkdalerobertkdale USAMember Posts: 912
edited July 2012 in Miscellaneous
I have reviewed TShirtBooth’s video on loading and saving attributes many times. Unfortunately it deals with only saving high scores. Although I know that the same principles can be applied to saving and loading a scene. I am utterly lost. In fact I have know idea where to begin?

Simply put I want to know how to save a scene during game play and then load it once the game starts up. This way the player doesn't have to start at the beginning of the game after they turn it off. In light of this I would like to respectfully ask for your help with this problem. Any help would be much appreciated. Thank you for your time. Does any one know of any video tutorials on this subject?

Big Smile Games Play Happy!
Check out our other GameSalad exclusives.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    @robertkdale

    Hi Robert, you don't really need a tutorial for this as it's relatively straightforward.

    Make a game integer attribute and call it SceneGo and set its value to 1.

    Wherever you're rule is for going to the next scene in each scene, just before it, put:

    Change attribute SceneGo to SceneGo +1

    Now in your Continue button of your menu, as well as using Load Attribute Behaviours - to include Load SceneGo, put at the end:

    When SceneGo = 2
    Change Scene Go to Scene: scene 2

    When SceneGo = 3
    Change Scene Go to Scene: scene 3

    etc.,
    all the way to your last scene.

    Edit: I've just noticed that you posted 2 identical threads; try not to do that; it gets people confused and clogs up the works! I've deleted the other one.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • robertkdalerobertkdale USAMember Posts: 912
    Thank You!

    Big Smile Games Play Happy!
    Check out our other GameSalad exclusives.

  • robertkdalerobertkdale USAMember Posts: 912

    Thanks for the timely response. Perhaps I am over thinking it and thus making things harder then what they are.

    I have a few questions if you don't mind. To begin I understand the first part in which you talk about making a game integer attribute and calling it SceneGo and set its value to 1. Also I understand the Change attribute SceneGo to SceneGo +1 part.


    However this is the part that I am still fuzzy on.
    Now in your Continue button of your menu, as well as using Load Attribute Behaviours - to include Load SceneGo, put at the end:

    When SceneGo = 2
    Change Scene Go to Scene: scene 2

    When SceneGo = 3
    Change Scene Go to Scene: scene 3

    etc.,
    all the way to your last scene.


    After reviewing this I have listed the following questions.

    Firstly, do I use the save attribute and if so how might I use it in this case?
    Do I place as save attribute in each scene?

    Secondly, does the continue button hold the load attributes and rules?

    Lastly, after the Load SceneGO attribute do I include a rule? Such as

    Rule
    If SceneGO= 2
    Change Scene attribute to name of scene2

    Also within my continue button do I place a separate rule for each scene?
    To illustrate, I have 27 scenes within my game. As a result will I have to have 27 separate rules within my continue button.

    Thank you for all of the help.

    Big Smile Games Play Happy!
    Check out our other GameSalad exclusives.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    No worries about more questions; I took it as read that you knew about the Save Attribute Behaviour so my bad...


    Firstly, do I use the save attribute and if so how might I use it in this case?
    Do I place as save attribute in each scene?
    Yes, you use the Save Attribute Behaviour immediately after
    Change Attribute SceneGo to SceneGo +1
    sorry I didn't mention that.

    Secondly, does the continue button hold the load attributes and rules?
    Yes, normally; if you think about it, when the user presses the Start, Begin, New or Go button, whatever you are calling it, the game starts fresh so you don't need to load any saved attributes.

    So you load them for the last saved game settings in the Continue button (or Continue Game button).

    Lastly, after the Load SceneGO attribute do I include a rule? Such as

    Rule
    If SceneGO= 2
    Change Scene attribute to name of scene2
    Yes, that's right.

    Also within my continue button do I place a separate rule for each scene?
    To illustrate, I have 27 scenes within my game. As a result will I have to have 27 separate rules within my continue button.
    Yes.

    Hope that's clearer now for you. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • HailCaes3rHailCaes3r Member Posts: 9

    Still a little confused on this wondering if anyone has any more advice. I have a rule when a timer hits 0 the scene is changed. Perhaps i mixed up the order of the rules above but it goes like this. Before the change scene, i input

    change attribute game.SceneGo to game.SceneGo+2 (Second Scene)
    Next- Save Attribute-game.SceneGo Key SceneGo1
    Change Scene

    For the Continue Button all in one rule
    attribute game.SceneGo=3
    actor receives even when touch is pressed
    Load attribute SceneGo1 Attribute game.SceneGo
    Change Scene-Scene 3

    Once i complete the level and move to scene 3, if i go back to the initial scene with the continue button and press on it, it just goes to the next scene. Any ideas?

Sign In or Register to comment.