This is a written tutorial on how to create a locked door using the default ADRIFT setup. It involves 2 locations, a static door, and a dynamic key.

How to make a locked door with a key.

  • To begin with, we are going to start by creating two rooms. For the sake of this tutorial, they will be named Room A and Room B. Join the rooms together by selecting the direction you wish. Make sure you that if you are selection the direction using Room A, that you select Room B in the direction tab. Otherwise you will you’ll just end up back in the same room.

  • Once you have two rooms created, click on the button that looks like a firecracker on the toolbar. You can also do this by selecting Create-Object, from the menu. You need to create key. Give it a prefix, such as a small and give it the object name key. Make sure that you select the Dynamic option.

  • From the drop down menu titled initial position (it starts off as Hidden) Select Held by someone. Once you are familiar with how to create and lock doors, you’ll likely want to hide the key in other locations or perhaps even use tasks to manipulate how the key comes into play. Don’t forget to give the key a description. Click the Add Object button.

  • Now, create another object the same as you did above. Give it a prefix, such as a wooden, and object name, door. This object will be Static, so make sure it is checked. This is the default option when creating objects. Next, on the right, you need to select which rooms the object exists in. Select Room A and Room B. This will allow the door to be manipulated from, and located in both rooms.

  • Now click on the Attributes tab. You will see a list of empty check boxes on the left. Go down until you find the one that says Object can be Opened and Closed, and starts off in state. Check that box. You will see the dropdown box to the right of it now active, along with the box that says is lockable. Check that box now and select the small key from the dropdown list.

  • Now go back and select the state that you wish the door to start out in, from the dropdown list. Since I have the player holding the key, I am going to select Locked from the list. Add the object.

  • We’re almost finished. You need to add a room restriction so that the player cannot move back and forth between the rooms while the door is locked. So open Room A again and click on the directions tab. Find the direction that you selected earlier for travel to Room B. After that direction, you will see only if Task... For example, you may have Move North to Room B only if Task.

  • Where it says Task, select Object from the dropdown list. Then select the small door from the next object dropdown list. And finally, in the last dropdown list you can select Open, Closed, or Locked from the list. At this time, there is not an Unlocked option. So the most likely option is to select Open from the list. Some may find this a pain, but do remember that you can always make a directional task for moving from one location to another with the restrictions that the door must either be open or closed.


Thanks to Mystery for providing this tutorial.