autoload and autosave?

developer6810developer6810 Member Posts: 139
edited July 2012 in Working with GS (Mac)
I know you have to make a load and save button and push or it won't load or save. Is there a way to make it automatically save and automatically load?

Best Answer

  • IsabelleKIsabelleK Posts: 2,807
    Accepted Answer
    You can put in in any actor you want - even in players actor - it doesn't matter. And yes, Timer resets itself when you change the scene.
    You can make additional attribute, call it SaveTime, and put a rule in each scene:

    Timer: Every 1 second
    Change attribute game.SaveTime to game.SaveTime+1

    Rule, if ANY:
    game.SaveTime is equal to: 60
    game.SaveTime is equal to: 120
    game.SaveTime is equal to: 180
    etc.
    Put your save behaviors here.

    This will autosave every one minute, and it won't reset timer.

Answers

  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Just put Save behaviors somewhere in the scene - don't make any rule or anything. This will autosave the game, when scene opens. You can also put in inside Timer, so it saves every 60 seconds, or something like that.
    Autoload works similar.
  • developer6810developer6810 Member Posts: 139
    So by putting it in the scene, do you mean making an invisible actor that's on each scene (if you mean that, wouldn't the timer reset each time you change the screen)?
  • developer6810developer6810 Member Posts: 139
    And for load, would you only put it on the main menu screen in an invisible actor?
  • developer6810developer6810 Member Posts: 139
    Sorry really new to GS.
  • developer6810developer6810 Member Posts: 139
    Then wouldn't you have to make an infinite number of multiples of 60 as the longer they play you have to keep adding to the rule when SaveTime keeps increasing?
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Then wouldn't you have to make an infinite number of multiples of 60 as the longer they play you have to keep adding to the rule when SaveTime keeps increasing?
    You can :) I wrote the simplest idea that came to my mind.

    For the autoload, I would put it in your first scene - with your logo, menu, or something like this. You can put Load behaviors into background actor.
  • developer6810developer6810 Member Posts: 139
    How would you make infinite ones then? (thanks for your help :) I really appreciate it)
  • developer6810developer6810 Member Posts: 139
    How would you make infinite ones then? (thanks for your help :) I really appreciate it)
  • developer6810developer6810 Member Posts: 139
    Then wouldn't you have to make an infinite number of multiples of 60 as the longer they play you have to keep adding to the rule when SaveTime keeps increasing?
    You can :) I wrote the simplest idea that came to my mind.

    For the autoload, I would put it in your first scene - with your logo, menu, or something like this. You can put Load behaviors into background actor.
    How exactly would you make an infinite number of events in a rule? (thanks for your help)

Sign In or Register to comment.