How do I know which inventory item was used in unhandled_event?

Started by simulacra, Mon 09/08/2004 13:40:55

Previous topic - Next topic

simulacra

I the unhandled_event function, I want to create a default event when a certain inventory item is used. But how do I know which one the player used?

Ashen

I think you'd use the character[CHARID].activeinv variable, so something like:

    if (character[GetPlayerCharacter()].activeinv == 1) {
      Display ("That doesn't need unlocking.");
    }
I know what you're thinking ... Don't think that.

Proskrito

or also, from the manual:

game.inv_activated : Inventory item that the player last clicked on. Useful for unhandled_event. 

SMF spam blocked by CleanTalk