certain object=certain action

Started by td, Mon 05/12/2005 19:29:14

Previous topic - Next topic

td

Dump question:
I have 2 object in inventory: the key (0) and the match (1)
How i should appoint only 0= open the door (for example) and only 1= other acton?

Ecpecially wanna answer Ashen and esper please :)

The "Station"(mystical story)  demo coming soon ... :)

Ashen

Ask and you shall recieve ...

Open the interaction editor for you door, and select Use inventory on, then (using scripting):
Code: ags
 if (player.ActiveInventory == iKey) { // where iKey is the script name of the Key object
  // Open Door scripting
}
else if (player.ActiveInventory == iMatch) {
  // Do Something Else scripting
}
// And so on, for any other items you want to include.


Using Interaction Editor commands, you want Conditonal - if inventory item was used.

If you need more detail, try a forum search - this question has been asked many times before. (It's also in the BFAQ, although that still shows old-style code.)

I know what you're thinking ... Don't think that.

td


SMF spam blocked by CleanTalk