Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Radiant on Mon 15/03/2004 14:01:23

Title: Active inv picture on GUI bar
Post by: Radiant on Mon 15/03/2004 14:01:23
Hi there,

I'm using a Sierra-type GUI. When EGO picks up an item, I have the cursormode automatically set to 'using an inv item', and the cursor image changed from the black-and-white bag icon to the sprite used for said item. This part works.
However, in the GUI icon bar, I have this box with an @INV tag (or however it's spelled) that shows the active inventory item. How do I change this? So far it only displays the item correctly if I pop up my inventory window and select the item again, not when I first pick it up.

By the way, why is there no 'SetInvProperty[Text]' command?
Title: Re:Active inv picture on GUI bar
Post by: Ishmael on Mon 15/03/2004 19:47:13
Well, if you set the cursor mode with something like:

{
AddInventory(3); // to add the new item
SetActiveInventory(3); // set the new item as the active item
SetCursorMode(MODE_USEINV); // set the inv cursor mode
}

It should work... Post your code here so we can see what's wrong, if it's a scripting problem.
Title: Re:Active inv picture on GUI bar
Post by: Radiant on Tue 16/03/2004 12:53:05
Ah, it works now, thanks.
I was using character[EGO].activeinv = x rather than SetActiveInv, that may have made a difference.