Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 01/07/2003 20:41:02

Title: Inventory Question
Post by: on Tue 01/07/2003 20:41:02
I know how to use any item from my inventory on a hotspot but how do I use a specific item on a hotspot?
Title: Re:Inventory Question
Post by: Proskrito on Tue 01/07/2003 20:49:32
you check which inventory item was used with:
if (player.activeinv==#){
do something;
}

Replace # with the inventory item you want.
Title: Re:Inventory Question
Post by: on Tue 01/07/2003 21:07:50
Im a serious newbie so can you explain it easier and how and where do I put that in my script.
Title: Re:Inventory Question
Post by: ThunderStorm on Tue 01/07/2003 21:17:25
The easiest way is to chose the "Condition: if inventory object was used" in the dialog editor right before running any further commands.
Title: Re:Inventory Question
Post by: MillsJROSS on Wed 02/07/2003 01:00:19
To eleborate a bit more...

Go the Roomeditor, then to areas, then select the hotspot you want the inventory item to act with. Then click interactions, the "Condition: if inventory item was used." Put the number of the inventory item, and then put what you want to happen. (You'll probably want the inventory object to be taken from your inventory, so you'd had a LoseInventor(X); command).

-MillsJROSS