How attributes work

ds1239ds1239 Member Posts: 33
edited October 2012 in Working with GS (Mac)
if I am making an iphone game involving attributes, do the attributes save/stay the same after the game is exited?

Best Answer

  • carlblanchetcarlblanchet Posts: 755
    edited October 2012 Accepted Answer
    You must use the "Save Attribute" behaviour to save each attribute that you want to keep their number (Do this when they are changed), and the "Load Attribute" behaviour to load them every time the game is opened (Do this in the Initial Scene).

    This will although not have effect in the gamesalad preview, but will save when the game is on a device, including gamesalad viewer.

Answers

  • ds1239ds1239 Member Posts: 33
    if i add a continue button to the game menue, then have a load attribute behavior to load the attribute of what level the player is on, then have it say:
    if LoadLevel = 1, the change scene to level 1. would that work?
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Yes, that would work. I don't know what you're doing in the game, but it's actually easier than that. You just have a "change scene" behavior in the button set to go off when it is pressed.

    Like i said, I don't know what you are doing in your game, because you could do it the way you described, but that way usually involves other types of conditions in the game to go to the next scene.
  • ds1239ds1239 Member Posts: 33
    its a short level platformed. most of the layout i want to be like cut the rope. just like how you could either continue, or go to level select.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    You could do it all in one scene, but you would need to spend some time watching a lot of videos on how to use tables, and recycling actors, and the like. And I recommend doing that.

    Or you could do it old school before we had tables and make a new scene for each level. It's a simple behavior to change scenes. Just make a new scene and call it "Scene2" or whatever you want, and then in the button onscreen in level 1, just drop a rule in it that says "when touch is pressed" - "Change scene" > Scene2

    I recommend getting to know GameSalad real well by watching the youtube cookbook vids. They will get you up and running in no time.

    http://www.youtube.com/user/GameSaladCookbook/videos?sort=dd&flow=list&page=1&view=0

    And this site is a lot of help as well.

    http://gshelper.com/
Sign In or Register to comment.