Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Bernie on Tue 16/09/2003 13:34:14

Title: Browsing through an Inventory
Post by: Bernie on Tue 16/09/2003 13:34:14
I want to browse through my custom inventory window with two buttons (left/right), but couldn't find an command that would perform such an action... so, how can I do this?

Thanks :D
Title: Re:Browsing through an Inventory
Post by: Ishmael on Tue 16/09/2003 15:50:49
The lucasarts GUI has these scripts...

   if ((button == 10) & (game.top_inv_item < game.num_inv_items - 7))
     game.top_inv_item = game.top_inv_item + 4;
   if ((button == 9) & (game.top_inv_item > 0))
     game.top_inv_item = game.top_inv_item - 4;
   }


Put this to the interface_click, under the if (interface==) of the inv gui, and set the button numbers and scrolling values to match you inventory's size.
Title: Re:Browsing through an Inventory
Post by: Bernie on Tue 16/09/2003 18:19:54
Thank you, that works great! :D