save/load dialog box
I want my whole game to be customized. I've created my own quitbox, I know exactly how to do that. I just wandered if anyone out there knew how to create a customized save/load dialog box. It can be popup like the default one or if anyone knows how to do in a listbox that would be even better! I played that alien rape escape and their save/load dialog box was customized so I know it is possible. (breath!)
So if anyone can help out it would be greatly appreciated!
Check the SAVE/LOAD GUI tutorial by Spyros http://atticwindow.adventuredevelopers.com/tutorials.php?id=1 (http://atticwindow.adventuredevelopers.com/tutorials.php?id=1)
~Cheers
Thanks, I did all that, but now it says "Parse error at index"
???
You forgot the "int index;" from the start of the global script..?
Ok thanks, now that's fine but now it says "parse error at else.
My script looks like this:
function interface_click(int interface, int button) {
if (interface==0) {
// if Restore interface
if (button==1) {
// if cancel is pressed
InterfaceOff(0);
// Close interface
else { index=ListBoxGetSelected(0,0);
// else get the selected game
RestoreGameSlot(savegameindex[index]);}
// restore the game
function interface_click(int interface, int button) {
if (interface==0) {
// if Restore interface
if (button==1) {
// if cancel is pressed
InterfaceOff(0);
// Close interface
} else { index=ListBoxGetSelected(0,0);
// else get the selected game
RestoreGameSlot(savegameindex[index]);}
// restore the game
Sorry for bringing this topic back from the dead, but I finally decided to use this in a proper game. I now have this problem. I can't save multiple times. Everytime I save, it just overwrites the current one, even if I specify a different name.
Also, if I want to summon the load/save GUI, do I always have to put in the folowing script, or will "GUIOn (SAVE/LOAD);" work?
if (keycode==363) {
CentreGUI (SAVE);
SetTextBoxText (SAVE, 0, "");
ListBoxSaveGameList (SAVE, 3);
index=ListBoxGetNumItems (SAVE,3);
if (index>19) {
Display ("You must overwrite a previous saved game.");
}
InterfaceOn (SAVE);
}
if (keycode==365) {
CentreGUI (RESTORE);
ListBoxSaveGameList (RESTORE, 0);
InterfaceOn (RESTORE);
}
without the "if keycode (x) {" stuff.
Any help?
We need the interface_click()'s code to help you out.
QuoteAlso, if I want to summon the load/save GUI, do I always have to put in the folowing script, or will "GUIOn (SAVE/LOAD);" work?
You have to put it, yes. You can, however, write two functions and put the code there. Then just call these functions when you need the save/load GUI to appear:
function ShowSaveGUI() {
CentreGUI (SAVE);
SetTextBoxText (SAVE, 0, "");
ListBoxSaveGameList (SAVE, 3);
index=ListBoxGetNumItems (SAVE,3);
if (index>19) {
Ã, Display ("You must overwrite a previous saved game.");
}
InterfaceOn (SAVE);
}
function ShowLoadGUI() {
CentreGUI (RESTORE);
ListBoxSaveGameList (RESTORE, 0);
InterfaceOn (RESTORE);
}
on_key_press:if (keycode==363) ShowSaveGUI();
if (keycode==365) ShowLoadGUI();