Coded doors?

Hey everyone. I’m a new inform user and i was wondering if it’s possible to make coded doors; if so, how?

What’s i’m looking to do is have a door with a simple numeric keypad, that when you enter a certain code, the door opens.

Thanks in advance :slight_smile:

Everything is possible! Here’s a simple breakdown:

  1. Make a door.
  2. Have a rule that stops people from going through it unless [some condition is satisfied].
  3. Make a keypad.
  4. Define a typing action with grammar like “type [a number] on [noun]”.
  5. Make a rule that checks whether the correct number was types, and which makes sure the condition of step 2 is satisfied if it was.

How you’d implement that obviously depends on which IF language you’re using. If you have trouble with a certain step, just make a post about it (including what you’ve tried and what exactly isn’t working) in the appropriate subforum (for example, the TADS subforum or the Inform subforum).