Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ZayanM on Sat 24/12/2005 14:57:02

Title: Inventory items not showing up
Post by: ZayanM on Sat 24/12/2005 14:57:02
Okay, I have simple problem. I can't get inventory objects to even show in the inventory window....  :-\

Does the inventory window have to be in a seperate GUI? Or can it be with the verb selections in the same GUI?

Help will be really appreciated.
Title: Re: Custom Inventory GUI
Post by: strazer on Sat 24/12/2005 15:07:13
(Thread split from here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=10946).)

The inventory items won't display if the InvWindow GUI control is smaller than an inventory item slot (40x22 pixels by default).
Set YourInvWindowName.ItemWidth and -.ItemHeight in the game_start function to change the inventory item slot size or enlarge your InvWindow control.
Title: Re: Custom Inventory GUI
Post by: ZayanM on Sat 24/12/2005 15:24:28
In the control window it says Width - 150, Height - 60
And Item width - 40 Item Height - 20

So the item's are small size. I am using high - res though, if that changes anything.
Title: Re: Custom Inventory GUI
Post by: strazer on Sat 24/12/2005 15:38:47
Right, I forgot you can set the ItemWidth and ItemHeight properties directly in the GUI editor.
Btw, the InvWindow control can be on any GUI anywhere.

Hm, but your dimensions look okay.
Are you sure that there really are inventory items in the character's inventory? If it's displaying the player's inventory, try checking "Player starts with this item" in the Inv item editor to make sure it's not a scripting problem.
Title: Re: Inventory items not showing up
Post by: ZayanM on Sat 24/12/2005 17:24:02
Thanks for the quick replies.

Yeah, there are inventory items with the player. They appeared when using default inventory. I disabled that default GUI, but that doesn't matter since there can be multiple inventory GUIs for the same character right?

Is there a specific name that I have to give it? I feel like I am missing something very small, and when it is found out will make me look very stupid ... lol.
Title: Re: Inventory items not showing up
Post by: Akumayo on Sat 24/12/2005 17:29:08
Okay, this probably isn't your problem, but you said:

Quote from: ZayanM on Sat 24/12/2005 15:24:28
In the control window it says Width - 150, Height - 60
And Item width - 40 Item Height - 20

Is the control window you mentioned an actually Inventory Window, or just a button, list box, or something?

Also, try re-enabling the default window, and see if the items are in it, while they aren't in your main one, that would narrow down your problem to the GUI itself and not the items.
Title: Re: Inventory items not showing up
Post by: ZayanM on Sat 24/12/2005 17:39:22
Yes I believe it is Inventory, made by the Add GUI Inventory Window button.  The label on the window says GUI 3 Control 7(Inventory) also.

The items show up on the default window, and the inventory items are set so they are with the character when the game starts. The character ID is ...............

I was about to finish the sentence but was going to make sure the IDs matched, but they Don't. Shoot, so sorry for the trouble.  :-X :-X :-X
Title: Re: Inventory items not showing up
Post by: Akumayo on Sat 24/12/2005 18:11:11
At least it wasn't a big problem eh?  See ya' around.