How to make a locked door

I am trying to make a item when used on a event will put it below the player. Can someone explain to me how to do it in MV?


Thank you,


STH
"How do I...?" questions belong in the Support forum for the engine you are using.  So...


I've moved this thread to RPGMaker MV Support. Please be sure to post your threads in the correct forum next time. Thank you.
In the event window, select 'Conditional Branch', tab three, Items. Select the item you want. This will allow you to make a literal key item. With that, you can set whatever you need within the conditional branch, whether it's simply making the door disappear using self-switches or having an opening/closing door.
ut's better to do this with page conditions instead of conditional branches if you want it automated - the page condition "item" activates when the item is in inventory - the conditional branch needs the player to access the event.
In the event window, select 'Conditional Branch', tab three, Items. Select the item you want. This will allow you to make a literal key item. With that, you can set whatever you need within the conditional branch, whether it's simply making the door disappear using self-switches or having an opening/closing door.

Thank you, this truly helped me. 
You're welcome. Of course, there are different ways to achieve this. As Andar mentioned, there is a spot in the event menu that allows you to have the trigger being the item itself without relying on conditional branches. I tend to use conditionals because I don't have to make another page for the opening/closing of the door.
I used the conditional branch, I also put after :End "this door is locked", so when I got the key it let me in, but still displayed "this door is locked" after gaining entrance. how does one fix that?
I used the conditional branch, I also put after :End "this door is locked", so when I got the key it let me in, but still displayed "this door is locked" after gaining entrance. how does one fix that?

I'd make one event page that just presents the dialogue "This door is locked", and then a second page with the "key" item set as a page conditional. The second page, of course, would unlock your door.
I used the conditional branch, I also put after :End "this door is locked", so when I got the key it let me in, but still displayed "this door is locked" after gaining entrance. how does one fix that?
You should post a screenshot of your event when asking for help so people can actually see what you might have done wrong. You should also start your own thread rather than tagging onto one that's five years old with a different version of the software 😛

But the answer to your question is - don't display the text "this door is locked" unless you don't have the key. The :End doesn't mean the event somehow stops, that's just the end of your conditional branch. So you would want to check the box in your conditional to have an Else. Then you do:
If party has the key item
- transfer player
else
- text "this door is locked"
Ooh, yes. That's much more efficient, do what ATT_Turan said.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-locked-door.72674/