Message-ID: <3B348CD8.E3EEA596@csi.com>
Date: Sat, 23 Jun 2001 08:34:32 -0400
From: John Colagioia <JColagioia@csi.com>
X-Mailer: Mozilla 4.61 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: [Inform] Enterable objects
References: <KeUX6.337$lg.129043@newsrump.sjc.telocity.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 128.238.10.127
X-Original-NNTP-Posting-Host: 128.238.10.127
X-Trace: excalibur.gbmtech.net 993299598 128.238.10.127 (23 Jun 2001 08:33:18 EST)
Organization: GBM Technologies Ltd
Lines: 21
X-Authenticated-User: jnc
X-Original-NNTP-Posting-Host: 127.0.0.1
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!howland.erols.net!newsfeed.fast.net!uunet!dca.uu.net!ash.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:89091

Dave Malaguti wrote:

>     This is probably a dumb question, but here goes...
>     I have an enterable object (a pickup truck, as it happens) that the
> player starts out in.  I don't want the player to be able to get out of the
> truck until certain conditions are met.  How do I do this?  I tried trapping
> the EXIT action in the truck's 'before' property, but nothing happens.  I've
> temporarily solved the problem by giving the truck 'react_before' and
> trapping EXIT there, but this seems awkward and will likely cause me
> headaches when the player is outside of the truck.
>     I've combed the DM without a hint of a solution.  What am I missing?

I don't have time to check this out right now, but could you trap the player in
the truck's out_to() method?  Something like:
    out_to [ ;
        if (conditions)
            return Outside_The_Truck;
        "Oddly, you can't seem to leave at this time.";
       ],


