scripting for locked doors

Started by guv, Thu 16/10/2008 23:58:56

Previous topic - Next topic

guv

i dont think that this is posted before but i have checked the scripting tutoriol, video tutoriol and the getting started tutoriol...
so can anybody help me with using item from the inv to activate commands with another object
e.g using a key to open a door

Daniel_1988

Read the topic that I have posted about gate's.

TwinMoon

Basically, go to that objects events tab, then look for "Use inv on object". Double click that.

Then, put:

if (player.ActiveInventory == iKey) {
  oDoor.Visible = false;
}


(this will assume you used an inventory item called iKey and remove an object called oDoor from the room.)

Khris

This is one of the most posted question of all times...

You can use "player.ActiveInventory" to check for the right inv item.

Unfortunately you're right about this not being explained in the manual's tutorial.

guv

thanks everyone my doors finished now:)


SMF spam blocked by CleanTalk