Issues with removing saved Attributes...

I load a group of saved attributes when my game starts and they load correctly. They are all booleans. They start out as false and then set to true.

I then built in a button that resets the attributes back to their default values and that works, but when the game is closed and restarted the original saved attributes are reloaded.

When I reset those attributes back to zero and use a save attribute after each one shouldn't it update the old attributes?

Any ideas?

Thanks in advance!

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    sounds like the keys you are saving to, and the keys you are saving from don't match.
  • Papalati_GamesPapalati_Games Member, PRO Posts: 6
    Hmm weird.

    Here's an example.

    Change Attribute
    game.level2unlocked to true

    save attribute

    game.level2unlocked key = unlock2


    then on startup

    load attribute

    key = unlock2 game.level2unlocked


    then I have a button that says

    if game.level2unlocked = true

    change attribute

    game.level2unlocked to false.

    save attribute

    game.level2unlocked = locked2

    Now that I just wrote that, I'm gonna just guess that because I'm not saving back over unlock2 that is why it is still loading the old key?

    Correct?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Correct.
  • Papalati_GamesPapalati_Games Member, PRO Posts: 6
    Thanks for helping me work that out :)
Sign In or Register to comment.