Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!uni-paderborn.de!fu-berlin.de!informatik.tu-muenchen.de!Germany.EU.net!main.Germany.EU.net!Frankfurt.Germany.EU.net!howland.erols.net!newsfeed.internetmci.com!MAXWELL!not-for-mail
From: klo@nexusprime.org (Kevin Lo)
Subject: Re: [Inform] Doors and Locks
Message-ID: <MPLANET.322dea2bklo9896b1@news.nexusprime.org>
Date: Wed, 4 Sep 1996 16:44:33 -0400
References: <322CBCF5.7AD4@iserv.net>
X-Newsreader: MicroPlanet Gravity v1.00 (30 Day Trial)
Lines: 28

In article <322CBCF5.7AD4@iserv.net>, harker@iserv.net says...
> Ok, I'm sure this has been done a million times, and rather than
> reinvent the wheel I'm going to ask.
> 
> How do I implement a door that acts like a "normal" door when it comes
> to the locks? That is, what is the best/easiest way to make a
> double-sided door which locks/unlocks with a key on one side, and on the
> other side can be locked/unlocked without a key?
> 
> It *seemed* really straight forward to simply capture "Unlock" in the
> 'before []' routine, but the parser prompts "What would you like to
> unlock the door with?" before the 'before []' routine can intercept.

	Nice conecpt! I scoured through all my Inform stuff, and couldn't find 
an "easy" way to do this, other than modifying the source code itself, because 
Inform automatically tests the following if you are trying to lock a door: Is 
it lockable, is it already locked, is it open, and does the direct object (the 
supposed "key") match the with_key variable on the door.
	I suppose there might be a way to code some sort of subroutine to extend 
"lock", but I'm not that advanced yet. :)

-- 
      ^       
    _' `_      * Kevin Lo -- http://www.nexusprime.org/personal/klo/
 .-~'   `~-.    - klo@bigfoot.com               - HTML / Perl / C / Java  
(  ' __. `  )   - Callsign: KF4JXF              - AKA Radnor & FDC Merlin
 `-''   ``-'


