Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ishmael on Fri 18/02/2005 21:52:55

Title: Inventory items not displayed on second inventory window [SOLVED for now]
Post by: Ishmael on Fri 18/02/2005 21:52:55
I was working on a project of mine, when I ran into this:

I have set up so that I have a virtual, invisible character for each NPC, that has the items the NPC posseses, as inventory items, and when the player comes to buy something from the NPC, the player character is change to that virtual character, and the trade GUI is opened. The GUI consists of some labels that display various bits of information, and an inventory window. The buy system works like a charm, mouse click when the pointer is over an object processes the buy event and so on, it's fine. When the trade GUI is closed, the player character is changed back to original, and his inventory is displayed again.

The problem is, that I can't see the items on this inventory window. I know they are there, as I made script that, upon right-click on inventory tells the number of inv item #0's that the player has, and I only get the report when there is an inventory item under the cursor. But I just cannot see the items on the second inventory GUI, which is initialy visible, but it has no items on it before the trade GUI has the trading NPC's items.

I'm using AGS version 2.62

(And naturally, with my luck, now that I go to play around with it some more it works... Or atleast I hope so, for my sake, as that would solve my problem ::))
Title: Re: Inventory items not displayed?
Post by: Rui 'Trovatore' Pires on Fri 18/02/2005 21:55:13
Just to make sure that that's covered, did you try updating the inventory?
Title: Re: Inventory items not displayed on second inventory window
Post by: Ishmael on Fri 18/02/2005 21:56:40
Ah, yes. I add and substract the items from the characters by modifying the character[].inv[] varialbe, and after each SetPlayerCharacter() I run UpdateInventory(). As I mentioned, I know the item is there, I just can't see it.
Title: Re: Inventory items not displayed on second inventory window
Post by: Pumaman on Sat 19/02/2005 19:04:25
Is the secondary inventory window about the same size as the main one?

2.62 doesn't handle multiple inventory windows very well, but this is being addressed by 2.7.
Title: Re: Inventory items not displayed on second inventory window
Post by: Ishmael on Sat 19/02/2005 20:20:28
The trade inventory is about 200x100 pixels and the Players inventory is 100x30 pixels.

Quote2.62 doesn't handle multiple inventory windows very well, but this is being addressed by 2.7.

Ok, thanks for the info.