Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: LRH on Thu 19/06/2008 04:01:18

Title: GUI and Inventory problem <SOLVED>
Post by: LRH on Thu 19/06/2008 04:01:18
Sorry to have to ask here, flipped through index and BFAQ a lot but didn't find a similar issue. I'll explain the best I can.

So I can grab an item, it appears in the inventory just fine, etc. etc. However, I can never select the item I want! Once I select one item, it wont let me switch to another one via clicking a different one. I'm stumped. I even tried making the entire image rather than having it blend in with background option. It still doesn't pick up on the selection.

All time and effort spent on my petty woes greatly appreciated :)
Title: Re: GUI and Inventory problem
Post by: Matti on Thu 19/06/2008 10:19:44
1. Is the item width and heigth you set in the inventory-gui the same of the actual item images?

2. Can you post your code related to the inventory (on_mouse_click in the main script I think)?
Title: Re: GUI and Inventory problem
Post by: LRH on Thu 19/06/2008 17:23:05
They can't all be different sizes? o.o
Title: Re: GUI and Inventory problem
Post by: Khris on Thu 19/06/2008 17:28:54
Apart from that this usually isn't visually appealing, the inv items are arranged in a grid and thus should share the same dimensions.
Title: Re: GUI and Inventory problem
Post by: LRH on Thu 19/06/2008 17:31:01
Okay, I made them all 50x50 for now for sake of simplicity, however, now I can't click ANY of them  ???

As far as I can see, I have no script related to the GUI other than save and load buttons, I didn't think any was needed for selecting an active item. I have no idea what's wrong :(



EDIT: Okay I'm onto something. I need to use the interact cursor BEFORE I go into the GUI and it selects items just fine. HOWEVER: how do I make it so that the GUI doesn't close when I click a button that changes the cursor to the interact mode?


SOLVED: It's probably really inefficient, but it works. I programmed the active item to be whatever is selected for each item for each cursor. Imma have a biiiiggggg ol' script for that o.o
Title: Re: GUI and Inventory problem
Post by: Khris on Thu 19/06/2008 19:02:13
Did you start a default game and are thus using the built-in inventory?

(There's no direct answer to your problem since we need to know a couple of things, handling the inventory can be tricky as there are various settings that need to be considered.)