Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Fritos on Fri 29/07/2005 01:42:51

Title: Slowly updating to 2.7, help needed: [SOLVED]
Post by: Fritos on Fri 29/07/2005 01:42:51
I have a function that will grab properties from my inventory items for me to display. This work's great pre-2.7, for any item the person clicks on:

Ã,  Ã,  Ã, GetInvPropertyText (GetInvAt (mouse.x, mouse.y), "Describe", describe);

Now in 2.7+ how can I get the item number to be whatever inventory item the person clicks on?

Ã,  Ã,  Ã, inventory[2].GetPropertyText("Describe", describe);

I've tried replacing with mouse coords. etc, with no avail. I also tired looking at the GetAtScreenXY command but can't figure how to plug it into the script like in pre-2.7.
Title: Re: Slowly updating to 2.7, help needed:
Post by: strazer on Fri 29/07/2005 01:49:55
The "game.inv_activated" variable holds the number of the inventory item the user last clicked on. So you can do
  inventory[game.inv_activated].GetPropertyText("Describe", describe);

(Btw, the noun is "description".)