Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!news.ruhr-uni-bochum.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!news.uni-kl.de!news.belwue.de!fu-berlin.de!cs.tu-berlin.de!uni-erlangen.de!kue!lrz-muenchen.de!informatik.tu-muenchen.de!Germany.EU.net!howland.reston.ans.net!tank.news.pipex.net!pipex!warwick!spuddy!spuddy.mew.co.uk!jaieff
From: jaieff@spuddy.mew.co.uk (JJF)
Subject: Re: [Inform] another question
Message-ID: <19960411.002929.89@spuddy.mew.co.uk>
Sender: jaieff@spuddy.mew.co.uk (James Farmer)
X-Posting-Agent: RISC OS Newsbase 0.55-pre-15
Reply-To: jaieff@spuddy.mew.co.uk
Organization: Spud's Public Usenet Domain
X-Newsreader: Archimedes TTFN Version 0.36
References: <4kd12u$mr5@black.clarku.edu>
Date: Thu, 11 Apr 1996 00:29:29 GMT
Lines: 38

In article <4kd12u$mr5@black.clarku.edu>,
          forispaa@black.clarku.edu (The Ur-Grue) waffled about:

> How can I make one object be hidden underneathe another object?
> For example, a rock. if you pick it up, it reveals a key. obviously
> the key can't be taken or looked at until the rock is moved.

Hmmm - there may well be some clever way to do this, but the way
I'd code it is this : I'd have the rock in the room to start with and
the key somewhere else.  Then I'd trap the "Take" action on the rock
to move the key to this room the first time the rock is taken.

I haven't tested this code, but I reckon it'd look something like this :

     Nearby theRock "rock"
       with name "rock",
            description "blah blah blah",
            before [;
             Take: if (self hasnt moved)
                   {
                     move Key to parent(self);
                     print "Hmmm - there was something hidden underneath
                            that rock.";
                   };
            ];

     Object Key "old iron key"
       with name "old" "iron" "key",
            description "blah blah blah";

As I recall, the library will set the "moved" flag after the rock is
taken for the first time.

-- 
*******************************************************************************
* Email: jaieff@spuddy.mew.co.uk         * The internet merely allows you to  *
*        J.J.Farmer-CSSE94@cs.bham.ac.uk *  look foolish in front of a lot    *
* WWW: http://www.cs.bham.ac.uk/~jjf/    *  more people.                      *
