I'm having types of save games handled by my game for certain occasions, that I don't want them to appear in the savegame list.
One of them is:
Name:
"System-RestartPoint"
Slot:
52
I use function FillSaveListDir, to fill a list with savegames. How to exclude for example System restart point from appearing? I'm using AGS 3.1.2. If I forgot something really important, I apologize.
I might be missing something in your original post here, but if your system restore is always guaranteed being saved to slot 52, can you call:
yourSaveList.RemoveItem(52);
... immediately after filling the list?
??
EDIT: as I understand it, RemoveItem() doesn't delete any files, it simply removes it from a list...
"FillSaveListDir"? Do you mean FillSaveGameList? Anyway, what works for me is to simply use high numbers for those special savegame slots (I use 100+, but actually I thought anything above 50 should be safe which doesn't seem to be the case). These shouldn't show up when filling the list. I wouldn't recommend removing entries manually as I think this could mess up the SelectedIndex references.
If he doesn't have SelectedIndex stored anywhere, he can set it to -1 after the RemoveItem call.
~Trent
Save game slot numbers above 100 will not be shown by FillSaveGameList, so use a slot number in the range 101-900 instead.
Quote from: GarageGothic on Mon 09/03/2009 17:53:30
"FillSaveListDir"? Do you mean FillSaveGameList? Anyway, what works for me is to simply use high numbers for those special savegame slots (I use 100+, but actually I thought anything above 50 should be safe which doesn't seem to be the case). These shouldn't show up when filling the list. I wouldn't recommend removing entries manually as I think this could mess up the SelectedIndex references.
It does cause a mess. I guess CJ gave the best answer...thanks a lot, once again.
Not sure CJ will check this thread again. But actually, what would be great would be if you could supply FillSaveGameList with an optional range parameter. That way you could for instance use FillSaveGameList(40) for your save game menu but FillSaveGameList(50) for your restore game menu so it would also display special savegames like autosave and quicksave (correctly ordered by save time) without risking the player overwriting them.
Quote from: GarageGothic on Tue 10/03/2009 11:48:02
Not sure CJ will check this thread again. But actually, what would be great would be if you could supply FillSaveGameList with an optional range parameter. That way you could for instance use FillSaveGameList(40) for your save game menu but FillSaveGameList(50) for your restore game menu so it would also display special savegames like autosave and quicksave (correctly ordered by save time) without risking the player overwriting them.
Nice one there, I was thinking of a function similar to that, but well, yours appears to be really easy to use as well.