GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Saving/Loading Game Progress

Hey guys
The title pretty much says it all. I've got a game I need published by the 7th of January, and the only way I can do that is if I get it submitted tonight. In the game I've got an Integer attribute called game.level, and I've set it so that, say, if the level is level 1 and the main character reaches the end gate, if attribute game.level is <2, it changes game.level to 2. I have an actor in every scene that saves game.level every second and in the opening sequence of my game it loads game.level. Even with this, if I complete one or two levels and force quit the app, then go back in, the game still starts as if nothing has been saved.
If anybody could please get back to me within about 2 hours with the solution, I will be SO thankful! I've been working on this game for 7 months and this is the absolute last thing I need to do before submission!
Thanks SO MUCH!
Harry

Comments

  • Braydon_SFXBraydon_SFX Posts: 0Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    edited December 2012
    I'm pretty sure that means that your saving or loading the attributes incorrectly. Make sure the key is EXACTLY the same in both the load and save attributes.
  • Harman327Harman327 Posts: 8Member
    Thanks man, but I just checked. Both of the keys are Level (with a capital L) I'll try switching it to lowercase, but I don't think that'll make a difference.
    Any other suggestions? And happy new year!
    Thanks
    Harry
  • Harman327Harman327 Posts: 8Member
    C'mon guys, any comments? Please?
  • Harman327Harman327 Posts: 8Member
    Can someone PLEASE help me with this!
  • ChakkuChakku Posts: 1,513Member
    @Harman327

    DON'T save game.level every second! Make a boolean that turns on when the level is complete, and only have it save it then. Also make a rule that prevents game.level from going backwards, so if a player gets to level 9, then replays level 2, he isn't then pulled back to game.level equaling 3.

    Hope this helps
    Chakku
  • Harman327Harman327 Posts: 8Member
    @Chakku

    I've already set it so that the game.level only changes up if game.level is below whatever number the level is, but I'll give the boolean a look.
    Thanks, and I'm still open to other suggestions!
    Harry
  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,909Member
    Write the info to a table and save the table.
This discussion has been closed.