Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: geork on Fri 11/09/2009 18:42:04

Title: inventory, save and load game issues.
Post by: geork on Fri 11/09/2009 18:42:04
 Hey all!
  Is there a way of calling up save game GUI, load game GUI and Inventory GUI without the buttons not working from GlobalScript.ash? I have the following code:

   else if(upcount == 5){
   gInventory.Visible = true;
  // switch to the Use cursor (to select items with)
  mouse.Mode = eModeInteract;
  // But, override the appearance to look like the arrow
  mouse.UseModeGraphic(eModePointer);
   }
   else if(upcount == 6){
    gSaveGame.Visible = true;
  // Get the list of save games
  lstSaveGamesList.FillSaveGameList();
  if (lstSaveGamesList.ItemCount > 0)
  {
    // If there is at least one, set the default text
    // to be the first game's name
    txtNewSaveName.Text = lstSaveGamesList.Items[0];
  }
  else
  {
    // No save games yet, default empty text.
    txtNewSaveName.Text = "";
  }
  mouse.UseModeGraphic(eModePointer);
  gIconbar.Visible = false;
   }
   else if(upcount == 7){
    gRestoreGame.Visible = true;
  lstRestoreGamesList.FillSaveGameList();
  mouse.UseModeGraphic(eModePointer);
  gIconbar.Visible = false;
   }

all the code inside these upcount ifs is copied from show_save_game_dialog, show_restore_game_dialog and show_inventory_window. the problem is I cannot call any of these functions (so I had to copy script) and don't know how to call the closing functions. Is there any way I can call the GUI and have the custome buttons work?
       Thanks.
Title: Re: inventory, save and load game issues.
Post by: RickJ on Sun 13/09/2009 10:22:36
 All GUI events are handled in the Global script.      I'm not sure what else you are asking or why?
Title: Re: inventory, save and load game issues.
Post by: geork on Sun 13/09/2009 16:37:27
 Sorry about that...the answere was I had to put the variable back to 0 :(
   Sorry to waste forum space, I was in a panic at the time
   Thanks again anyway