Slowly updating to 2.7, help needed: [SOLVED]

Started by Fritos, Fri 29/07/2005 01:42:51

Previous topic - Next topic

Fritos

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.

strazer

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".)

SMF spam blocked by CleanTalk