Somehow, I seem to have managed to break my basic inventory - save - restore - quit GUI. I've looked over the code a dozen times, and can't see where I'm going wrong. Hopefully, fresh eyes will spot what I've goofed up.
I'm only posting the ICONBAR script; I added an @overhotspot@ function, and a parser window, and I can C&P the script for them, as well-- just wanted to start with the basic stuff, first.
if (interface == ICONBAR) {
if (button == 0) { // show inventory
show_inventory_window();
}
else if (button == 1) { // use selected inventory
if (character[ GetPlayerCharacter() ].activeinv >= 0)
SetCursorMode(4);
}
else if (button == 2) // save game
SaveGameDialog();
else if (button == 3) // load game
RestoreGameDialog();
else if (button == 4) // quit
QuitGame(1);
else if (button == 5) // about
Display("Adventure Game Studio v2 run-time engine[[Copyright (c) 1999-2003 Chris Jones");
} // end if interface ICONBAR
Thanks for any help!
hmmm. what happens when you start the game?
does it give you an error or something?
That script don't look broken to me... might you have goofed up the GUI itself then?
Maybe your buttons aren't set to Left click -> Run script.
Hindersh: hmmm. what happens when you start the game?
does it give you an error or something?
Nope! Game runs fine-- but when I click for inventory, save, etc, nothing at all happens.
TK: That script don't look broken to me... might you have goofed up the GUI itself then?
Well, hell. I was hoping I'd screwed up the script-- then it *has* to be something in the construction-- or perhaps the scripts I had running for the other GUIs was interfering in some way. I'll look into that, too.
SteveMcCrea: Maybe your buttons aren't set to Left click -> Run script.
Checked-- and they were set to Run script. But I've noted that down for future reference, because I'm sure at some point or another, I'll make *that* mistake, too.
For the moment, I've imported the GUI I saved when I did my last backup, so I can continue working. I've also found another way of getting the effect I've needed, so it's not necessary to finishing the game [hopefully to be ready for this month's MAGS]. Screenshot below, for the interested.
Anyway, thanks for the suggestions, they're appreciated greatly.
(http://overactivei.net/oi/ss01.gif)