¿Save Data after reset the game?

RubiyoooRubiyooo Member Posts: 163
edited February 2012 in Working with GS (Mac)

Hello I would like how can i save a data of a game.
And when i reset the game That value it's all ready and loaded.

For example to Score.

Thanks ;)

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi @Rubiyooo

    You use the Save and Load Behaviors. So you drag out the Save behaviour to the rules where you want to save the Score, and put the Score attribute name in the attribute field, then an identifying key (you decide what that is) in the Key field.

    Once that's done, at the beginning of the game, usually at the menu level, place an actor off-screen and put a Load Attribute behaviour in its Rules. Put your Score attribute there and the same key as you used for the Save Behavior.

    Note though that the Load behaviour will only register via the GSC Viewer on the device, as well as an ad hoc. But not if you quit your game file and start Preview again.


    ----------------------------------------------
    http://davidgriffinapps.co.uk/

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

  • RubiyoooRubiyooo Member Posts: 163
    Thanks you very much Gyroscope!!
    And if i want to start again the game (iPad turn off/ iPad turn on) and load the last value? Thanks ;)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    You're welcome!

    If you want to start the game from new, then put your Load Behaviors in a Continue button, for instance. That way, if the user presses the start button, it'll start the game as new but if the user presses Continue, providing you've saved all your attributes later in the game and put all the load attributes in the continue button, then the game will carry on from where the user left off. (So don't forget to Save a finished level each level with a Save Attribute and a load level in the continue button. Also some rules: when WhichLevel = 1 Change Scene Level 1, etc.)

    :-)

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

  • RubiyoooRubiyooo Member Posts: 163
    Arigato!! Gyroscope ^^
    Thanks you very much and another user ask the same question!! hahaha :D http://forums.gamesalad.com/discussion/39382/do-i-need-to-save-gameglobal-attributes

    p.d Epic Fail (i used ¿ in the subject post)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Glad it worked out for you!

    @Rubiyooo wrote: "p.d Epic Fail (i used ¿ in the subject post)

    No worries at all! That's the Spanish way of asking questions, isn't it? To my english eyes, it looks interesting! :-)

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

Sign In or Register to comment.