How to do "use inventory item on object?" (Solved)

Started by , Sat 04/02/2006 22:27:58

Previous topic - Next topic

Icemant90

How would I script/otherwise make it so that you can use an inventory item on an object?

Mugs

#1
-First of all, give your inventory item a "Script-O-name" (ex.: iItem)
-Second, in the "object interaction editor", run a script under "Use inventory on object" and type in this function:


if (player.ActiveInventory=="Item Script-O-name"){

}

Here's an example using iItem as the object's name:
Code: ags

if (player.ActiveInventory==iItem){

//type script here

}
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Ashen

BFAQ Updated to include new scripting.

Also, you don't have to give your items Script-O-Names - one will be generated based on the item's name (although you can change it if you want).
I know what you're thinking ... Don't think that.

Icemant90


SMF spam blocked by CleanTalk