Newsgroups: rec.games.int-fiction,rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!news.dkrz.de!dscomsa.desy.de!news.belwue.de!swidir.switch.ch!nntp.coast.net!news.sprintlink.net!news-peer.sprintlink.net!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: Inform-Problems
Message-ID: <erkyrathDzHntB.JqM@netcom.com>
Followup-To: rec.arts.int-fiction
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <53vtae$mhu@news00.btx.dtag.de>
Date: Fri, 18 Oct 1996 20:34:23 GMT
Lines: 42
Sender: erkyrath@netcom.netcom.com
Xref: nntp.gmd.de rec.games.int-fiction:18006 rec.arts.int-fiction:17342

Uwe Bekel (uwe_r.bekel@t-online.de) wrote:
> I Have some difficulties in programming in Inform :

Programming questions are usually discussed on rec.arts.int-fiction, not 
rec.games.int-fiction. I've redirected followups.

> First, i have several objects in my game that should not at all be listed
> in the inventory.I tried to make their Invent property a routine that
> just returns true.Now the Object doesnt appear in inventory, but a 
> new-line still does.

Hm. That's kind of tricky. I can't think of anything off-hand.

If you want an object which is always accessible, but not really in the 
inventory -- the player can't drop it -- you can use scope routines. See 
the "Nasal Twinge" sample game, which has source code for a "nose" object 
which is always around but doesn't appear in your inventory.

> Second, I have an object that can contain only one special other object.
> When the player moves, i want the special object fall out of it.
> I tried the after [; go : rule of the first object, also with 
> if (noun==0), but i think this rule is just not reached while the lib
> moves the player.Will i have to include the neccessary rules in all
> After properties of all the rooms ? Or do i have to write a 
> GamePreRoutine instead?

No, the Go before/after rules are only called on rooms, not objects 
you're carrying (or other objects in the room.)

You can probably do what you want by writing a react_before rule for the
object. It looks like a before rule. When an action occurs, all objects in
scope get their react_before rules checked, and then the player, room, 
and object being acted on get their before rules checked.

There's a react_after too, if that works better for you.

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
