edited November 2015 in ORK Scripting
Due to the fact that I am making an android game, i should automatically save the game when the application gets in background and maybe destroyed by the android OS.

Therefore I want to save the game in the slot from the loaded game.

ATM I am saving to a auto slot file with the
SaveGameHandler.Instance ().Save (SaveGameHandler.AUTOSAVE_INDEX);
when
void OnApplicationPause(bool pauseStatus)

But it would be better to save to the slot to the loaded game. (Maybe I have to think about a new game, when the loaded game-slot is not available)

So my question here is, how to get the index of the current loaded game? Because I can not find something in the api :)

Many Thanks.

Dominik
Post edited by widnig89 on
  • There are the auto save slots for that - you can have multiple auto save slots and ask the player which slot he wants to use when starting a new game.

    The currently used auto save slot can be used through ORK.Game.AutoSaveSlot, e.g. to save to it:
    ORK.SaveGame.Save(ORK.Game.AutoSaveSlot);

    Btw. ORK.SaveGame gives you the save game handler instance :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you GiL. :) That helps me a lot.
Sign In or Register to comment.