Existing SaveSlots?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ModestFacialHair
Posts: 2
Joined: Thu Sep 19, 2024 1:17 pm

Existing SaveSlots?

Post by ModestFacialHair »

Hi,

I'm working through the learning curve of the SaveSystem - great work, very easy to handle, thanks!

I was hoping to have an arbitrary number of saveslots and then just display existing saves by iterating from slot 0 to slot n. Then I can allow the player to overwrite, delete or add an existing one.

There doesn't seem to be any obvious way of tracking what slot n might be, though. I feel like I'm missing something obvious. Should I just track the highest slot number in a metadata file? Or iterate through files in the directory and identify what the slot number is on each? If so, do I just have to use FileSystem objects, there's no nice easy wrapper for them in the SaveSystem? Or am I just going about it wrong?

TIA!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Existing SaveSlots?

Post by Tony Li »

Hi,

Yes, you can track that by yourself, or set a very high upper bound for n and loop from 0 to n (or n down to 0 if you prefer) to check SaveSystem.HasSavedGameInSlot().
ModestFacialHair
Posts: 2
Joined: Thu Sep 19, 2024 1:17 pm

Re: Existing SaveSlots?

Post by ModestFacialHair »

I should have thought of just 'a very high upper bound for n' - thanks.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Existing SaveSlots?

Post by Tony Li »

Glad to help!
Post Reply