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?
I think you'd use the character[CHARID].activeinv variable, so something like:
if (character[GetPlayerCharacter()].activeinv == 1) {
Display ("That doesn't need unlocking.");
}
or also, from the manual:
game.inv_activated : Inventory item that the player last clicked on. Useful for unhandled_event.