How do you make a key unlock a door?

Hi, I'm a bit new at this and i'm having trouble. My player starts with a key in their inventory and i want them to use it to unlock a door. How do I do that?

Side note, if you know, how do I have someone look down and find something?


Have you worked through the Quest Tutorial? If not, that is probably the best place to start building up your knowledge.
http://docs.textadventures.co.uk/quest/

To unlock a door, create a door object, describe it as a 'container' through the 'features' tab. This then provides a 'container' tab, allowing you to say more about the container. Set the 'container type' to a 'closed container', which then gives you options to describe how the door can be opened.

For your second query, it would be more usual just to find something by looking at the location/object where it is hidden, i.e.

You are standing on a wooden floor.
look at floor
The floor is covered in dust but in one corner you see a small brass key. You pick it up.


I did, I just wasn't completely connecting that to the use of an object. (just being stupid basically) Thank you for your help!


Apologies! I've just looked through the tutorial and it doesn't seem to include an example of unlocking a door with a key. It talks about exits early on so a reasonable assumption is that it should be possible to describe an exit as a locked door, which is perhaps your thinking?


...on your second point, 'look down' is a built in exit option (you can look in any direction even if you can't move in that direction). I didn't want to say that initially if you were starting out.


the 'guide' section (which has the 'door/exit/lock' help) in the docs, is a bit more obscure (easy to miss it's link), here it is for you:

http://docs.textadventures.co.uk/quest/guides/ (look/scroll down for the revelent link/s for the 'door/exit/lock' stuff)

http://docs.textadventures.co.uk/quest/ (the main page of the doc site, if you scroll down a bit and look under the the 'Other information' category/section, the very last/bottom link for it, is the guide link called 'how to')


actually... the tutorial does have a section on it:

http://docs.textadventures.co.uk/quest/tutorial/using_lockable_exits.html

(but still take a look at the 'guide/how to' link too, as it has a lot of really good help for people!)


I saw this thread, and thought I would write a tutorial on how to do it properly, so the door can be both locked and unlocked from both sides, and it is not straightforwards at all. I have previously said do it as a container, but that gets complicated fast. The tutorial says do it as a verb, but you cannot do that because the built-in unlock feature stops it.

I now think the best way is to create LOCK and UNLOCK commands for the specific room.

ETA: See tutorial
http://pixie-if.blogspot.co.uk/p/blog-page_14.html


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums