Complete Newbie Question: Doors And How to Make Them?

Hi there! I'm a complete newbie to Quest and am writing my first text adventure. Okay. So far, my text adventure has two rooms. What I want to do is put a door between them. I've figured out that I need to make the "door" a "room" of its own, so in other words, make three rooms: Room 1, the Door, then Room 2. Right? Then put a "Knob" on the door as an Object, and give it a verb, "Turn." And then give the door a verb called "Open." But that's all I've figured out. Please help! What do I do next? Please be aware that I am a complete n00b. I know my way around program code -- I've written code in Java, JavaScript, and AppleScript, so I'm no stranger to that realm, if I need to go there. However I am TOTALLY and completely NEW to the realm of Quest and Text Adventure creation! Any help is greatly appreciated!

KV has done some cool stuff with doors here:

If that’s too much to start with, let us know.

(filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)
(again, filler for getting my edited post, updated/posted)

changing the 'parent' (containment/parent-child heirarchy), is done directly via the built-in 'parent' Object Attribute (via scripting) or the 'MoveObject (MOVING_OBJECT, DESTINATION_OBJECT)' helper Script/Function (via scripting), and/or using the 'Exit' OBJECTS (known as 'Elements' in quest).

what actually controls the 'open/closed' and 'locked/unlocked' states are the built-in Boolean Attributes: 'isopen' and 'locked'

there's also a lot of built-in (including helper) functionality regarding 'open/closed' and 'locked/unlocked' states/controls as well (such as the 'Open' and 'Closed' built-in Verbs/Commands), which can cause some confusion/issues too, or at least for me, lol. This includes the 'Types/Object_Types/Inherited_Attributes' (these act as like 'classes' at the user/game-maker/non-programmer level), such as: 'container_base', 'container', 'container_open' (container functionality, starts out in the open state), 'container_closed' (container functionality, starts out in the closed state), 'container_lockable' (basically just enables the lockable states/controls for a container for you), 'openable' (for 'door' Objects: openable/closable states but NO container functionality), and 'surface' (is a visible+accessible container, so there's no openable/closable state to it, such as for 'table' Objects)

one design, is to set the 'Exit' OBJECT/Element as (in code, as scripting, example) 'NAME_OF_EXIT.locked=true', and have a 'door' Object have the 'unlock/use_key_on/open' Verbs/Commands, which (for convenience) opens the 'door' and unlocks the 'Exit' OBJECT/Element (NAME_OF_EXIT.locked=false) via its scripting, allowing you to now use the 'Exit' OBJECT/Element to move to the desired/new/next/target 'room' Object

there's lots of resources:

quest documentation (just some/important/main/useful links/pages of it): (categorical order) (alphabetical order)

tutorials/guides/libraries/code/help/etc: (I think this is Quest Site user 'onimike' videos, but not sure) (here's, at least, 'onimike' new tutorials, anyways, lol)

there's also XanMag's 'tutorials and templates' game, as a 'tutorial 2', but the link is not working:

you can try to find his game manually... but I'm not even sure what category it is under....

ask if you need help with anything!

Okay, I tried downloading KV's "DoorLib," but GitHub says the project is long gone from their servers. Too bad, as it looked like exactly what I needed.

And dude, hegemonkhan, I appreciate the effort to educate me, but I barely understood what you were talking about. I'm a complete newbie to Quest. I don't fully grok the interface or the power of it yet. I asked a question in English, and you answered in Klingon, no offense. What I need are step by step instructions. "First do this, then do this."

DoorLib seemed cool on the surface, but it had quite a few issues, so I did my best to make sure no one could find it online. (Sorry, but it's for everyone's best interest.)

I wish there was an easy approach I could suggest which would work as expected, but that simply isn't the case.

I cover all sorts of door bases in this post (and I also provide a link to the page concerning setting up doors in Quest's documentation):

If you read beyond that post, that thread gets quite complicated, but everyone does continue to make excellent suggestions all the way to the end.

My advice is to avoid doors in your first game. You can lock the exits themselves and customize the locked message. This is how Quest is setup to work.

To set up a door that works with an exit, you have to set up a script on the door and set up a script on the exit, and each script has to check the attributes of the door and exit before deciding if the player can:

  • open the door
  • unlock the door
  • go through the door/exit

If you want a two-sided door, you can have a script move the door from room A to room B, depending on the location of the player. With this method, you would have two exits (one from A to B, the other from B to A), each requiring scripts to check the locked and isopen attribute on the door.

It seems like it should be simple, but it's actually the biggest pain in the butt in Quest, as far as coding is concerned. (This is true in my case, at any rate. Doors are [expletive deleted]!)

you can see if this doc page helps:

if not, I can set up a sample game, for you to see how to do 'door' functionality... hopefully it won't be too much of an issue, though I've had trouble with it in the past, due to not knowing that well in how the built-in functionality works/does/etc (I'm lazy... I just script/code in my own stuff... I need to get around to learning quest's built-in functionality better... but I keep procrastinating, lol)

My advice is to avoid doors in your first game.


My advice is to create a new game with 2 or 3 rooms and doors connecting them. Once you make this simple test game work, use that door functionality in your real game.

This post has 2 example games. One is the game I made by following the Quest docs page: Setting Up a Door (which HK just referenced). The second example game has my code for two-sided doors.

If you read that entire thread, you should find out everything you always wanted to know about doors but were afraid to ask.

I don't think there's anything door-related that someone didn't mention in that thread.

In my tutorial “game” that I had online and took down I had a fairly simple door setup. I copy-pasted the original door and moved it to the adjoining room. Door and door1. When I unlocked door and opened it, I simply Doubled the script to accommodate door1. That way when you unlocked door,
It also unlocked the second object door1. When you opened door it also opened door1. Obviously you have to unlock the locked exit as well. But, if you close the door or lock the door again, you just double your script to the other door object.

It’s kind of clumsy, but it worked. The player doesn’t see the two object doors as two doors. Just the one. Make sure the alias for each is the same. If you’re REALLY nit picky, you’d also have to have a proper look at description for the door from each side and assume the door only swings one way (unlike KV - haha).

I’ve also really gotten lazy on occasion and used things like siding doors or doors that simply disappear when unlocked. Just depends what you want to do.

Not sure I helped or muddied the water more. It’s what I do!

And I typed this on my phone in between one of about 100 grad parties I had to go to so forgive the muck of it all. :)

If you want and think it would help, I can send you that bit of code and you can paste it into a new game to see what I did. I also sent you a “Quest mail”.

Good luck.

You can make exits to objects as well as rooms. You can do that.

Or, just make a door object, and move the player when it's opened.

MoveObject (player, A 1)

In my tutorial “game” that I had online and took down

Whiskey Tango Foxtrot, Xanadu Magoo?

That was for the greater good!

(the greater good*)

You should put it on QFQ's account!

* Reference to the film Hot Fuzz

assume the door only swings one way (unlike KV - haha)


Don't listen to XM, ladies! I only have eyes for you.

You can make exits to objects as well as rooms.

This one time, at band camp, I made an exit to an object that could be taken, and, when I was testing my game, I had the object in my inventory, and when I entered GO IN, the game froze, and I didn't save first, so I had to start all over again, and then, the second time through, I didn't pick up the object, and everything worked.

Thank you all SOOOO much for all the helpful ideas, links, and information! I am so going to read through every link and idea everyone has posted! THANK YOU!

Log in to post a reply.