X-Newsreader: Geminisoft Pimmy 3.2 Eng - www.geminisoft.com
From: "John Colagioia" <JColagioia@csi.com>
Newsgroups: rec.arts.int-fiction
Subject: Re: Making a "found_in" object disappear
Date: Mon, 24 Jun 2002 08:17:28 -0400
References: <3d169af2$0$79564$3c090ad1@news.plethora.net>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: ool-182f30fa.dyn.optonline.net
X-Original-NNTP-Posting-Host: ool-182f30fa.dyn.optonline.net
Message-ID: <3d170df4@excalibur.gbmtech.net>
X-Trace: excalibur.gbmtech.net 1024921076 ool-182f30fa.dyn.optonline.net (24 Jun 2002 08:17:56 -0400)
Organization: ProNet USA Inc.
Lines: 46
X-Authenticated-User: jnc
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!news.maxwell.syr.edu!news-xfer.siscom.net!uunet!dca.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:105390

seebs@plethora.net (Peter Seebach) wrote:
>I'm trying to do the following:
>1.  I have 24 identical doors.  Each door joins two rooms.
>2.  I want the doors to only "exist" when you have a specific object.
>So... when you don't have the object, "ne" isn't a direction, you can't
>"look door", etcetera.
>When you have the object, looking around the room says "The janitor's door
>is closed."
>Any suggestions?

I don't quite have the time to test this, but I think this needs
to be handled in two places.  First, the doors either need to
have/not have the absent Attribute, or a "method" that checks
for the presence of the mentioned Plot Device.  Either way,
taking/dropping the Plot Device needs to make a call to
MoveFloatingObject(), I believe.

Then the ugly part.  Each exit that would normally point to a
door needs to return false.  In this case, I see one of two
possible methods for (as an example) ne_to:

[ ne_to_option_1 door ;
 if (self.door_to_ne has absent)
    rfalse;
 return (self.door_to_ne);
];

[ ne_to_option_2 ;
 if (Plot_Device in actor)
    return (self.door_to_ne);
 rfalse;
];

Naturally, they do the same thing, assuming the doors' found_in
properties take advantage of absent.

Another alternative would be to use something like react_before()
to mediate door access.  This may be the best solution, since it
can be made completely general to the class, I think.  After all,
the door_dir property (method) already tells you which direction
to preempt.

Sorry the "best" of the solutions came at the end of a page or
two of drivel...

[...]
