GameSalad

Save attributes when app is closed

ghettogamesghettogames Posts: 8Member, PRO
edited August 23 in Help Wanted

i try to make a new thinking app witch already hit the play store
i just updated my app to versioncode 9
with a save / load attribute
the way i did it is make a new actor and save attribute with integer or boolean in the first
and load attribute at the start menu
does this sounds right
or am i doing something wrong

i want my app to continue the game when you close it and open it up again
i think my method works but i am not sure about if is the right way to do it
please help me with this one :smiley:

Comments

  • IceboxIcebox Posts: 1,434Member, PRO
    edited August 22

    You have two ways to save , either by saving attributes using save and load behaviours

    save attribute game.aaa to key "xx"
    load key "xx" to attribute game.aaa

    the best way to load is to place the actor at the first scene for example on the loading scene ( if you have any). make sure you type the key between quotes "" if you open the expression editor , otherwise no need to worry about it.

    If you want to check/test whether your game is loading or not simply reset your game via GS viewer. It works like quitting/opening the app.

    You can also save using tables , which is how i usually save everything cause it doesn't require you to load and its easy to reset/copy tables.Its really simple but might look confusing if your not familiar with tables.

  • ghettogamesghettogames Posts: 8Member, PRO

    hey guys i´m working on an update for my game
    where you can save and load position
    so that when you close down you app
    it starts up from where you left
    i´m on the windows version of gamesalad btw

    anyone with a good heart that can help :smiley:

  • Triangularity+GamesTriangularity Games Posts: 123Member, PRO

    There is a behavior called "Save Attribute". You can use this to save an attribute to a key say for example "Save Attribute" -> position as "Key" -> playerPosition. Then in your menu or splash screen have an actor with a "Load Attribute" behavior in it which says From Key -> playerPosition, "Load Attribute" -> position. Hope this helps

  • pHghostpHghost London, UKPosts: 2,062Member

    Or use tables. Tables are a lot more powerful and flexible. Also, you can save all the scene's data in one table.

    With save attribute, you need to remember all of your keys and it quickly becomes a mess.

  • ghettogamesghettogames Posts: 8Member, PRO

    hey guys i´m building on a different game from the others
    where you are a zombie witch needs to watch out from jumping giant doughnuts
    and i want to make so that it saves my world attributes even when game is turned off
    how do i do that ??

  • ghettogamesghettogames Posts: 8Member, PRO

    hey all
    i´m working on a game called dohzombu
    and i want it to save all of the game process
    even when you turn of the phone or just quit
    how do i do that ??

  • RowdyPantsRowdyPants Posts: 240Member, PRO

    @ghettogames There are two main ways of saving to and loading from in GameSalad. They are Tables And Attributes (or a combination of both). These cookbook tutorials and forums should help:

    Cookbook : Attributes
    Cookbook : Tables

    Forum : Attributes
    Forum : Tables

  • RowdyPantsRowdyPants Posts: 240Member, PRO

    @ghettogames Hi, these questions have been answered many times over. Try searching the forums before starting a new topic.

  • ToqueToque Posts: 999Member, PRO

    @ghettogames said:
    hey all
    i´m working on a game called dohzombu
    and i want it to save all of the game process
    even when you turn of the phone or just quit
    how do i do that ??

    You want to learn the save attribute behavior.
    Google as there are YouTube videos on it.

  • IceboxIcebox Posts: 1,434Member, PRO

    http://forums.gamesalad.com/discussion/95392/need-help-with-app#latest

    http://forums.gamesalad.com/discussion/95394/help-please-want-to-save-scene#latest

    http://forums.gamesalad.com/discussion/95398/turning-game-of-and-get-all-set-from-where-it-was#latest

    and now this thread .. :# If your having trouble with something specific provide more details so we can help you with it. All the answers that were provided didn't help so there must be something missing.

  • tatiangtatiang Posts: 11,039Member, Sous Chef, PRO, Senior Sous-Chef
    edited August 23

    You've created FOUR threads for this exact issue. I merged your threads into this one.
    Please stop making new threads. You're basically spamming the forums. If you need to add information, click on My Discussions at the top-right of the forums page and add a new post to an existing thread.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.