Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Fri 31/10/2003 18:14:32

Title: Inventory Item Help!
Post by: on Fri 31/10/2003 18:14:32
How do I get AGS to use a specific inventory item not just ANY item. Everytime I use any item on my hotspot it will have the same reaction and I want it to only react a certain way with inventory item #1 not with EVERY inventory item. Where do I specify only to react a certain way with a certain inventory item. It's irritating me and wasting time cause now my game production has stopped while I figure this out.
Title: Re:Inventory Item Help!
Post by: Totoro on Fri 31/10/2003 18:22:49
In the editor, you can put a if-condition called "if inventory item # was selected" into the "inventory item was used" action-list, select the number of the inventory item and add the wanted effect after this if-condition.
Mmmh... maybe I should remember what the parts of the editors are acutally called, I don't think its called action-list, but its the place where you decide the effects of your action.
Title: Re:Inventory Item Help!
Post by: RickJ on Fri 31/10/2003 19:09:56
inf the event handler you would put soemthing like the following to qualify the action.

if (character[EGO].activeinv == 1) {
  // Do something
}
else {
  // Do nothing
  Display("You can't use it for that!");
}