Message-ID: <3B8500C9.24BA6E2C@csi.com>
Date: Thu, 23 Aug 2001 09:10:33 -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] Simple ASK ABOUT TOPIC  question
References: <jh%g7.41404$wZ3.3285308@news20.bellglobal.com>
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 998571766 208.34.37.104 (23 Aug 2001 09:02:46 EST)
Lines: 27
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!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:91470

marksimo wrote:

> If the player is in the vicinity of an NPC, I'm trying to figure out how to
> make
> >ask about [topic]
> work the same as
> >ask [npc] about [topic]
> I believe I've seen "ask" implemented this way in some games, but I can't
> remember which ones. Can somebody show me a way to accomplish this, or point
> me to some source code for a game that uses this ASK method?

I don't quite have the time to work this through, at the moment, but obviously
you need a verb:
    * 'about' Topic -> VagueAsk;
or something.

VagueAskSub() would then have to do something like:
    objectloop (i in NPC_Class)    ! Or however you identify your NPCs
        if (TestScope (i, player))
            ! Here, you get to count them.  If there's only one, then call
AskSub(),
            ! otherwise, issue an error and return.
There might be cleaner ways to do this, but I can't think of them off the top of
my head.  Looking through Appendix 3 of the Designer's Manual (Library Routines)
will probably give you a handful of ideas to improve this, though.


