Question about "save attribute"

lowskilowski Member Posts: 25
edited November -1 in Working with GS (Mac)
I'm trying to make checkpoints for my game at the end of every level and i have a question about the save attribute feature. I have two save attributes that save both the x and y positions of my player controlled actor. When the actor overlaps with an area the player is prompted to save their progress and proceed to the next level by pressing the up button. In the save attribute section there is an input box for the attribute to be saved and then there is a "key" option. My question is about the "key" box. Can I leave it blank? If not, what am I supposed to put in there? These questions also apply to the load attribute feature as it also has a "key" option. Oh and I don't have the express version of GS so that means that I cannot test the save and load attributes right?

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    The key allows you to load the saved data to any other attribute in the game, not just the one that it was saved from.
  • lowskilowski Member Posts: 25
    I'm not sure I understand. What would be the point of that?
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I could see it used to hold swap values...

    Rule:
    If game.currentScore > game.highScore1
    ---Change game.highScore1 to game.currentScore
    ---Load Attribute: "High 1" to game.highScore2
    ---Load Attribute: "High 2" to game.highScore3
    Otherwise:
    ---Rule:
    ---If game.currentScore > game.highScore2
    ------Change game.highScore2 to game.currentScore
    ------Load Attribute: "High 2" to game.highScore3
    ---Otherwise:
    ...etc
  • lowskilowski Member Posts: 25
    Ah, I see. But would my setup work if I leave the key section blank?
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    There would be no way to load a saved attribute not assigned to a key, so no.

    Think of saving/loading an attribute as using a safety deposit box. You have to manage both putting stuff in and taking it out, and both operations need a key*. Would you expect documents stored in a safety deposit box to instantly be back in your briefcase then next time you need them?

    * And your SSN, DOB and Mother's maiden name... ;-)
  • lowskilowski Member Posts: 25
    Well that makes sense. But it's prompting me for a key, the key is just some word? I don't understand how a word matters in loading my actors latest saved location...
  • chosenonestudioschosenonestudios Member Posts: 1,714
    pick any word you want for your key... Just make sure when you enter it in... Its exactly the same on both ends...
  • lowskilowski Member Posts: 25
    Okay, thanks :D I was just wondering if there was more to it than what it seemed.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Nope, it's exactly what it seems. You have as much control over the naming of keys as you do attributes.
Sign In or Register to comment.