Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!router1.news.adelphia.net!uunet!ash.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: Re: [inform] <<AskFor>>, or <<>> with actors
Message-ID: <GFvB7p.GD9@world.std.com>
Date: Mon, 2 Jul 2001 22:45:25 GMT
References: <GFpCqo.E2o@world.std.com> <3b40c7c8$1@post.newsfeeds.com>
Organization: The World Public Access UNIX, Brookline, MA
Lines: 34
Xref: news.duke.edu rec.arts.int-fiction:89446

Jim Fisher <Jim@OnyxRing.com> wrote:
>I've been working on an article about this very thing for several weeks now.
>The timing of your post is... almost too coincidental.

Well, actually, we're talking about different things. Your
article is about reimplmenting actions so they can be used
by NPCs--which is well and good and great.

But all I want is for the code in orders/##Give to get run
when I reach a certain point in orders/##Drop.

I investigated parserm.h and discovered that both of the
behaviors I was seeing were in fact correct--assuming
I understand where <<Verb>> enters the parser, it turns
out that both redirecting commands to NPCs, and turning
"AskFor" into "NPC, Give" is handled in the outer parser
mainloop, between the time it accepts and parses input
and the time it dispatches to the code that handles <<Verb>>.

So, the answer is either to clone the "redirect command
to NPCs" code (which is pretty short, about 15 lines, but
in fine Inform tradition is part of a five-hundred line
routine instead of being its own routine), or to just
make both orders/##Give and orders/##Drop call a common
subroutine, so the latter is what I did, since I only
needed this once.

I am working on a comp game where you can order people
around to do actual normal things, and I might come back
and look at your suggestions when I get to that part,
although maybe not since it displays as black text on
a black background in my (old) browser.

SeanB
