Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!Germany.EU.net!howland.reston.ans.net!vixen.cso.uiuc.edu!rs6000.cmp.ilstu.edu!ceforma
From: ceforma@rs6000.cmp.ilstu.edu (Christopher E. Forman)
Subject: Inform "Ask": I've ALMOST got this!
Message-ID: <1995Aug29.234602.17677@rs6000.cmp.ilstu.edu>
Date: Tue, 29 Aug 1995 23:46:02 GMT
Organization: Illinois State University
X-Newsreader: TIN [version 1.2 PL2]
Lines: 43

Okay, I've made some progress, but I still can't get the "Ask" verb to
behave in a manner similar to the "Query" verb in "Balances."
Here's a basic example of what I've got so far:

Object Subjects "ss";
[ AskSub;
    print_paddr second.description; new_line;
];

[ Topic i;
  if (scope_stage == 1) return 0;
  if (scope_stage == 2) {
    ObjectLoop (i in Subjects) PlaceInScope(i); rtrue;
  }
  DefArt(noun); " doesn't know anything about that.";
];

Object s1 "s1" Subjects
  with name "game" "adventure" "quest" "my",
       description [;
     if (noun == Dungeon_Master)
       "You ask the Dungeon Master about the game.";
       ];

Extend "ask" replace
           * noun "about" scope=Topic                   -> Ask;

The problem is, I get garbage when the game tries to print out "description."
Is the "if" statement causing this?  If so, how can I include an "if" check
so that asking different characters about the same thing can generate
different responses?  (Please don't suggest simply going with "special_word."
I've tried this and I don't like the way it restricts you to one word in the
subject you're asking about -- i.e., you can "ASK CHARACTER ABOUT COINS" but
you can't "ASK CHARACTER ABOUT CHEST OF GOLD COINS.")

Thanks in advance.  (I'm getting close, so these annoying queries should stop
sometime soon.)


-- 
C.E. Forman                                      ceforma@rs6000.cmp.ilstu.edu
Read the I-F e-zine XYZZYnews, at ftp.gmd.de:/if-archive/magazines/xyzzynews!
* Interactive Fiction * Beavis and Butt-Head * The X-Files * MST3K * C/C++ *
