Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!Germany.EU.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!lerc.nasa.gov!purdue!news.cs.indiana.edu!shulick@guava.ucs.indiana.edu
From: "Sam Hulick" <shulick@guava.ucs.indiana.edu>
Subject: Re: Inform: Objects with components
Message-ID: <1995Sep1.184708.12473@news.cs.indiana.edu>
Organization: Vallen Software
References: <426839$9dc@ophelia.waterloo.net>
Date: Fri, 1 Sep 1995 18:46:57 -0500
Lines: 62


I know what you're going through. :)  For example, say you have a cat
wearing some little wool booties or something.  If it's setup like this:

Object cat "cat" 
 ...blah

Nearby booties "...

Then you hav to explicitly type "get booties from cat" not just "get
booties", otherwise you will get that error "That seems to be part of
the cat."

Here is an example of a nightstand with two drawers.  The nightstand is
a supporter, so the drawers are ON it, BUT they are concealed.
 My trick I use in my games is simple:

   * If I don't want the object visible OR affected by "get all", I set
     it concealed scenery.
   * If I just want it hidden from 'look' but affected by "get all",
     I just set it scenery.

Note that you can't make (I THINK) doors and openable objects scenery
AND concaled.. I've had trouble opening doors before that were like
that.  But I may be wrong.

Object hroom_nstand "nightstand" empty_hroom
 with  name "stand" "night" "nightstand",
       description [;
          print "The nightstand is next to the bed.  The top drawer is ";
          if (tdraw has open) print "open"; else print "closed";
          if (bdraw has open)
          {
             if (tdraw has open) " and so is the bottom one.";
             else " and the bottom one is open.";
          }
          if (tdraw has open) " and the bottom one is closed.";
          else " and so is the bottom one.";
       ],
 has   supporter static;

Nearby tdraw "top drawer"
 with  name "top" "drawer",
       description [;
          print "The top drawer is ";
          if (self has open) "open."; else "closed.";
       ],
 has   container openable concealed static;

Nearby bdraw "bottom drawer"
 with  name "bottom" "drawer",
       description [;
          print "The bottom drawer is ";
          if (self has open) "open."; else "closed.";
       ],
 has   container openable concealed static;

-- 
--- Sam Hulick ------------- shulick@indiana.edu ---------------------
Systems Consultant        | Homepage:
Indiana College Placement |    http://copper.ucs.indiana.edu/~shulick/
  and Assessment Center   | PGP public key available on request
