Message-ID: <3B73D4E6.6C7A576@csi.com>
Date: Fri, 10 Aug 2001 08:34:46 -0400
From: John Colagioia <JColagioia@csi.com>
Organization: No Conspiracy Here...
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en,fr,ru,es,it,ga,de,ja,gd,eu
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: [Inform] Nice simple straightforward question
References: <326rk9.007.ln@127.0.0.1>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.34.37.104
X-Original-NNTP-Posting-Host: 208.34.37.104
X-Trace: excalibur.gbmtech.net 997450320 208.34.37.104 (10 Aug 2001 09:32:00 EST)
Lines: 25
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!newscon02.news.prodigy.com!prodigy.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!news-reader.ntrnet.net!uunet!ash.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:90946

David Given wrote:
[...]

> The player is in the chair. I want the player to be able to drop stuff,
> but have the stuff end up on the floor, not in the chair.
> What do I do?

I could swear I've seen this in the IDM somewhere, but I can't track it down at
the moment.  However, I seem to recall that the example used the each_turn()
method, basically, to remove dropped objects from scope.  The idea was that
obj.each_turn() runs after everything else--before()s, after()s, daemon()s, etc.,
and thus has the "final say" in the matter (unless, I assume, there's more than
one each_turn, at which point they battle it out or something...).

Ah--exercise 49, p150.  Not actual programming.  Just a "why would you."  Answer
on p462.

Anyway, I'd suggest giving the chair an each_turn() method which simply takes its
contents (minus any animates) and places them in its own parent (presumably the
room, though not necessarily).

I'm steering clear of the related "what order should things happen in" discussion,
not too far from here...


