The use of inventory items!

Started by The-Hellfish, Thu 02/09/2004 10:24:03

Previous topic - Next topic

The-Hellfish

I am an intermediate scripter that have problems with the use of inventory items. If you, say, have two items. Ex: like a key and a cheese ball. and you only want the cheese to work wíth the mouse... What do then have to write?

Dusk

Quote from: The-Hellfish on Thu 02/09/2004 10:24:03
If you, say, have two items. Ex: like a key and a cheese ball. and you only want the cheese to work wíth the mouse... What do then have to write?

You have to check what item is selected in the USEINV interaction script of the mouse.
Code: ags

#define ITEM_CHEESE 21 //your number here
if (character[GetPlayerCharacer()].activeinv == ITEM_CHEESE) {
//it works
} else {
//random "not working" speech
}

bye,
D.

Pumaman

You can also use the "Conditional - if inventory item was used" interaction.

SMF spam blocked by CleanTalk