RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Using a Key to open a Door??

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 84
I have an inn and made it so when you talk to the inn keeper he gives you a key that goes in your inventory.  The next step I am having trouble with... how to actually use the key on the door.  I am trying to make it so you unlock the door and it takes you into the room.  Once in the room you sleep, wake up, then leave.  When you leave the room the key is removed from your inventory.

Thanks.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I see others reading this post so they'll probably answer this before I post this. Anyways. It's probably one of the simplest events you can make.

After you have the key in your inventory, make a door event. In the event, start it with a Conditional Branch event command and set it to check if the player has your 'key' in inventory. Then in the first section from the branch, go about having the door opening and you could pop in a SE of a door opening in there too. In the "else" section of the Conditional branch, you just put text in there to display something like, "You don't have the key to open this door." Conditional Branches are one of the most commonly used event commands. If you don't already know how to use them, it would be a good idea to learn them first or at least soon. :)

******
Rep:
Level 89
Let's attack agressively.
As grafikal said, except he forgot to put the "Change Item" command to remove the key when you open the door. Here is how the event should look like:
« Last Edit: March 03, 2009, 02:43:00 AM by Knight Rider »

*
Rep: +0/-0Level 84
Thank you both for your help.  Everything is working great now   ;D  I haven't used this program for a couple years so I have to relearn it ;)  Thanks again!

**
Rep: +0/-0Level 83
Umm I don't really understand all to much of that so if it isn't to much trouble could someone make a tutorial for me?

**
Rep: +0/-0Level 83
You need to create a new item. Name the item house key. make it purchasable from a house shop, or the king of that town, or something lame like that. Now, create the door of your house, and put in a conditional branch. Go to page 4 and select "Item" and select the house key we just made. Now, play a SE, and create a transfer player to the inside of the house event.  Now, your done. You may want to put in a text box in the "Else" box, saying "You do not have the key!"

**
Rep: +0/-0Level 83
if u still dont get how to do it i can make u a tutorial and put it on youtube...im guessin its resolved now but if its not pm me and il do it and then give u the youtube link