Forum rules - please read before posting.

AutoSave with SlotIndex and other things related with Save/Load

edited June 2019 in Technical Q&A

Ok, so, I followed THIS TUTORIAL for having custom save slots into my game. So at the moment I've a system of Load/Save that consists of 6 slots with a screenshot and a label (save name) written by user through Input, etc. All works great. Except I'd like few improvements...

Now I don't have an AutoSave, but (1) I wonder how the AutoSave works, since I'd like it to overwrite itself every time. Which slot is it picking? Should I create a new slot for AutoSaves only? If so, how? Considering the "SavesList" Menu options are for "Load or Save" (or "Import", but not "AutoSaves"). How can I show AutoSaved files only on a specific slot? I'm a bit confused on how it works...

Also when I select the slot to Save and the SaveName menu appears, where to digit my Input (Save Name) label, (2) I cannot select it with the cursor, as usually it works on most of the software out there, but I'm forced to move around only with the keyboard. Isn't this implemented on AC somehow? Would be faster (smarter) if I can select (highlight) the Input Element name with the mouse... (to delete it all at once, delete only part of it, etc...)

Last but not least, (3) how can I tell the user if he/she is sure to overwrite a slot? Like that if instead of selecting an empty slot he/she selects an existing slot and, instead of being able to Save it right away, a menu with the warning "Are you sure you want to overwrite the existing saved file?" shall appear.

Comments

  • Autosaves are saved in slot #0. There can only be one per save profile. There are listed among other saves in SavesList elements.

    By default, a user can still overwrite this slot - but you can check if the clicked "Slot index" is equal to zero to control the exact behaviour (e.g. always name this slot "Autosave").

    where to digit my Input (Save Name) label, (2) I cannot select it with the cursor, as usually it works on most of the software out there, but I'm forced to move around only with the keyboard

    Please re-phrase this and provide screenshots, I'm not clear on your meaning here. "Move around" where?

    Unless Require selection to accept input? is checked in the Input element's properties, it should accept input no matter where the cursor is.

    how can I tell the user if he/she is sure to overwrite a slot?

    You can create a new menu with your warning text and buttons that appears when the input is made final (in the tutorial, this is the "ConfirmSave" ActionList). Replace this with a new ActionList that shows this new menu, and then run ConfirmSave if the user presses "OK" in this new one.

  • 1- But if the user saved something on Slot 0, then the AutoSave will automatically overwrite it?

    2- I mean select the Input Name with the mouse, like you can select a text here in this forum or everywhere else. Point the cursor, click and drag to select a portion of a text. I cannot do that in the "Input" field of AC.

    3- This mean the "Confirm Overwrite" is when I wrote the name, not when I select the slot...?

    1. Correct - but again, you can prevent this by reading the "Slot index" value when a slot is clicked to ignore it if equal to zero.
    2. If your menu's Source is Adventure Creator, you can't - this mode is based on Unity's OnGUI system which doesn't allow for that. You can, however, achieve this with Unity Ui Prefab mode.
    3. Then rework the Actions to show the confirm menu first - the principle is the same.
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!