If autosave have been loaded.

  • #1, by ke4Sunday, 30. August 2015, 11:52 5 years ago
    Hi,

    I just started create a menu and i have autosave and continue option, so the user don't really have to save the game manually even once.

    How can i detect if the autosave assigned to this function have been loaded? So the autosave don't have to be loaded evertime when user goes to the menu but only for the first time when the game is launched and then just simply change to scene of the current character and save the time of loading.
    Guess i could set some value to 1 on loading and when it's 1 just change the scene instead, but the value is going to be saved within the autosave.

    Thanks

    Key Killer

    810 Posts


  • #2, by sebastianSunday, 30. August 2015, 12:08 5 years ago
    you could check with Lua if the file exists...

    Thread Captain

    2336 Posts

  • #3, by ke4Sunday, 30. August 2015, 12:12 5 years ago
    But the file exists even when i quit the game, no? That means when i quit the game & launch it again i can't change the scene but i need to load the autosave for the first time.

    Key Killer

    810 Posts

  • #4, by afrlmeSunday, 30. August 2015, 13:02 5 years ago
    Before saving you could set the value / condition back to the default value (or whatever value you need it to be) & then change it back after say a 10 second pause or something to give the engine enough time to write the current data to the allocated autosave.

    Imperator

    6812 Posts

  • #5, by ke4Sunday, 30. August 2015, 13:22 5 years ago
    I just realized that i maybe don't have to change anything, because i don't get the 1 value before i load the autosave and when there is autosave loaded i can always change into the scene of current character. I just need this autosave to include the 1 value.

    Key Killer

    810 Posts

  • #6, by afrlmeSunday, 30. August 2015, 13:50 5 years ago
    I was wondering why you needed to change the value. The initial value would be defined on game launch by the game data & wouldn't change until after loading a save or autosave file.

    Imperator

    6812 Posts

  • #7, by ke4Sunday, 30. August 2015, 13:52 5 years ago
    Yeah... sorry for the stupid question then :-)

    Key Killer

    810 Posts

Write post