okay. I have my script which is working, to an extent. Both of my save and load boxes work fine, BUT:
MY restopre box works backwards. If you choose to load the first game, it loads the last. And if you choose to load the last game, it loads the first and so on. My script is below, any answers?
if (interface==6) {
Ã, Ã,Â
SetMouseCursor(0);
Ã, Ã, if (button==2) {
Ã, Ã, Ã, // if save is pressed
Ã, Ã, Ã, // Count saved games
Ã, Ã, Ã, index=ListBoxGetNumItems(6,3); // Count saved games
Ã, Ã, Ã, if (index<20) {
Ã, Ã, Ã, Ã, Ã, GetTextBoxText(6,0,text); // Get the typed text
Ã, Ã, Ã, Ã, Ã, GUIOff (6);
Ã, Ã, Ã, Ã, Ã, SaveGameSlot(index,text); // Save game (text as description)
Ã, Ã, Ã, Ã, Ã,Â
Ã, Ã, Ã, }
Ã, Ã, Ã, else { // if saved games are 20
Ã, Ã, Ã, Ã, Ã, index=ListBoxGetSelected(6,3); // Get the selected save game
Ã, Ã, Ã, Ã, Ã, GetTextBoxText(6,0,text); // Get the typed text
Ã, Ã, Ã, Ã, Ã,Â
Ã, Ã, Ã, Ã, Ã, SaveGameSlot(savegameindex[index],text); // Overwrite the selected game
Ã, Ã, Ã, }
Ã, Ã, }
Ã, Ã, if (button==4) {
Ã, Ã, Ã, SetMouseCursor(0);
Ã, Ã, Ã, GUIOff (6);
Ã, Ã, Ã, game.text_shadow_color = 4;
Ã, Ã, }
}
if (interface == 7) {
if (button == 1) {
RestoreGameSlot(savegameindex[index]);
Ã, SetCursorMode(0);
GUIOff(7);
Ã, Ã, game.text_shadow_color = 4;
Ã, Ã, }
Ã, else if (button == 2) {
Ã, Ã, SetCursorMode(0);
Ã, Ã, Ã, GUIOff(7);
Ã, Ã, }
Ã, }
You can find a tutorial at http://atticwindow.adventuredevelopers.com just go to the tutorials section.
That tutorial is missing some bits, so for help check these threads:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14684.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=11790.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=11515.0
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=10095.0
And there's another thread, which deals with the Save/Load GUI found in the BlueGUI, but I can't find it right now... BlueGUI can be found here: http://www.gaia-spa.com/blusoft/Download/download.html
see first post
are you sure you're doing ListBoxSaveGameList when you turn the GUI on?
where would I put that?
okay. I have my script which is working, to an extent. Both of my save and load boxes work fine, BUT:
MY restopre box works backwards. If you choose to load the first game, it loads the last. And if you choose to load the last game, it loads the first and so on. My script is below, any answers?
if (interface==6) {
SetMouseCursor(0);
if (button==2) {
// if save is pressed
// Count saved games
index=ListBoxGetNumItems(6,3); // Count saved games
if (index<20) {
GetTextBoxText(6,0,text); // Get the typed text
GUIOff (6);
SaveGameSlot(index,text); // Save game (text as description)
}
else { // if saved games are 20
index=ListBoxGetSelected(6,3); // Get the selected save game
GetTextBoxText(6,0,text); // Get the typed text
SaveGameSlot(savegameindex[index],text); // Overwrite the selected game
}
}
if (button==4) {
SetMouseCursor(0);
GUIOff (6);
game.text_shadow_color = 4;
}
}
if (interface == 7) {
if (button == 1) {
RestoreGameSlot(savegameindex[index]);
SetCursorMode(0);
GUIOff(7);
game.text_shadow_color = 4;
}
else if (button == 2) {
SetCursorMode(0);
GUIOff(7);
}
}
looks like you're missing:
index = ListBoxGetSelected(7, XXX);
before RestoreGameSlot (where XXX is the object number of the list control).
Great CJ, all done now