Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!newsserver.jvnc.net!goliath.montclair.edu!rutgers!news.cs.indiana.edu!shulick@guava.ucs.indiana.edu
From: "Sam Hulick" <shulick@guava.ucs.indiana.edu>
Subject: Re: Inform: An object existing in two rooms
Message-ID: <1995Aug29.191431.1459@news.cs.indiana.edu>
Organization: Vallen Software
References: <1995Aug29.143747.23202@news.cs.indiana.edu>
Date: Tue, 29 Aug 1995 19:14:23 -0500
Lines: 43


I attempted something different.  The window is actually a door (you can
climb through it--enter it) so it is kind of like:

Object thewin "window"
 with  found_in room1 room2,
       add_to_scope rope
 ....

Object rope "silk rope" room1
 ... blah...

The window is obviously in scope in both room1 and room2, but the rope
is only in scope in room1.  Why?  add_to_scope seems to be failing.  I'm
still trying to find some decent way to have the same item present in
both rooms, but also have it able to be picked up.  Scenic objects have
no problem being in multiple rooms.  Perhaps I could do this?:

Object rope1 "silk rope"
 with  name "silk" "rope",
       description "A rope.",
       after [;
        Take: if (self hasnt general)
              {
                 give self general;
                 remove rope2;
              }
       ];

Object rope2 "silk rope"
 with .... etc., same as above,
      after [;
       Take: if (self hasnt general)
             { give self general; remove rope1; }
      ];

This is kind of stupid, but I imagine it would work.  Any other ideas?

-- 
--- 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
