Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

AutoSave switched off in Save menu

Hi,

Happy new year first off! My game is coming out in 3 months! Woohoo!

Anyways, how do I ensure that the player cannot save into the autosave in the Save menu?

Comments

  • You can't, currently. I will see if it's possible to make optional, however.

  • I stand corrected. This is possible, by relying on an ActionList asset to perform the actual save.

    Uncheck Save when click on? in the SavesList menu, then assign an ActionList asset in the ActionList when click field. In that asset, create an Integer parameter named "Slot index" - and then have the SavesList set its value to the slot index automatically.

    To save using the ActionList, use the Save: Save or load Action and pass this parameter value to the slot index to save to. When the user clicks on "Autosave", the slot index will be zero - so you can use the ActionList: Check paramter to check this parameter first.

  • Awesome thanks!!!
  • Hi,

    I got as far as creating the parameter, but am, a bit stuck. Please see screenshots:

    https://www.dropbox.com/sh/dqbfs5y0k4o4l8m/AAC331hbtlxgxValyhL-VoT8a?dl=0

  • If this is to save a game, make sure the Save: Save or load Action's Method is set to Overwrite existing save, not Load game.

    You'll then need to overwrite the Slot index to save field with your parameter. Change (No parameter) to Slot index.

    More on parameters can be found in this tutorial.

  • Sorry, even with using the tutorial I am In a Muddle. I am not sure what to do as the slot index parameter is 0? So when I set my overwrite existing save and pass the parameter into the slot index to overwrite, it is ‘slot index
  • Sorry, even with using the tutorial I am In a Muddle. I am not sure what to do as the slot index parameter is 0? So when I set my overwrite existing save and pass the parameter into the slot index to overwrite, it is ‘slot index (0). So how do I overwrite specific slots? And check that it isn't autosave that it is saving too? (0)?

    See screenshots:

    https://www.dropbox.com/sh/dqbfs5y0k4o4l8m/AAC331hbtlxgxValyhL-VoT8a?dl=0

  • The (0) in Slot index (0) refers to the ID number of the parameter - not anything to do with the actual slot value. From the looks of your screenshots, you've now set things up correctly so far as saving via Actions goes. Are you able to confirm this by saving in different slots, and checking the Console log that the correct save slot was written to?

    Once this is running correctly, it's just a case of reading the value of this parameter so that the Save: Save or load Action doesn't run if it is equal to zero. This can be done with the ActionList: Check parameter Action.

  • Ok, so I have it working where you cannot save on Autosave now, so that works, however, when i try and save in slots 1,2,3 it says:

    Cannot save at this time - either blocking ActionLists, a Conversation is active, or saving has been manually locked.

    -> AC debug logger
    UnityEngine.Debug:LogWarning(Object, Object)
    AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:25)
    AC.ActionSaveHandle:PerformSaveOrLoad() (at Assets/AdventureCreator/Scripts/Actions/ActionSaveHandle.cs:191)
    AC.ActionSaveHandle:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionSaveHandle.cs:68)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:365)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:315)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:547)
    AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:465)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:434)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    See screenshots here:

    https://www.dropbox.com/sh/dqbfs5y0k4o4l8m/AAC331hbtlxgxValyhL-VoT8a?dl=0

    Thanks

  • The ActionList that runs the Save: Save or load Action is exempt from the "blocking ActionList" check. Are any other ActionLists running? You can list them via the AC Status box at the bottom of the Settings Manager.

  • This is working now, however, my loads keep going out of number order since adding the new actionlist to stop saving Autosave.

    See screenshots:

    https://www.dropbox.com/sh/dqbfs5y0k4o4l8m/AAC331hbtlxgxValyhL-VoT8a?dl=0

    Plus, the saves local to my computer are saved in my build, is this correct?

  • my loads keep going out of number order since adding the new actionlist to stop saving Autosave.

    Do you have Order save lists by update time? checked in your Settings Manager?

    saves local to my computer are saved in my build, is this correct?

    What exactly do you mean by this? Unless you're overriding the save location, your save files will be stored in your PC's persistentDataPath, which is totally separate from the build files.

  • Unticked that and it worked

    I mean that when I do a build it keeps my saves in when played on another computer. I realise that I need to refresh my persistantDataPath as you mentioned in my other thread
  • The persistentDataPath is local to your own computer - and since it's not in the same directory as the build itself I don't see how saves will transfer unless you manually copy them over.

    Upon saving in the Editor, AC will tell you where the file is placed. Is it saving files in that directory, or in PlayerPrefs? Check that the same file is present in another computer.

Sign In or Register to comment.

Howdy, Stranger!

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

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!