Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!newsserver.jvnc.net!newsserver2.jvnc.net!howland.reston.ans.net!spool.mu.edu!news.cs.indiana.edu!shulick@ugly.ucs.indiana.edu
From: "Sam Hulick" <shulick@ugly.ucs.indiana.edu>
Subject: Re: Inform: Stuck with expandable menus w/ DoMenu..
Message-ID: <1995Oct3.203823.13599@news.cs.indiana.edu>
Organization: Vallen Software
References: <1995Oct1.143933.292@news.cs.indiana.edu> <GDR11.95Oct2103646@stint.cl.cam.ac.uk>
Date: Tue, 3 Oct 1995 20:38:17 -0500
Lines: 24


Gareth, thanks for the help.. :)
I actually found my own way before I saw your post.  Your method is
probably a bit more tidy, but mine is more compact. (I shall post it
later).  Basically I have a hint_array and a hintcounter.  As a person
discovers a new puzzle, AddHint() is called and passed a bit ($1, $2,
$4, $8, $10, etc.).  This bit is added into the array and the counter is
incremented.  When the menu is called, I just check
hint_array-->menu_item for the bit.. so if $1 corresponds to the
fishtank puzzle,

  if (hint_array-->menu_item == $1) ...fish help...
etc.

It's quite effective. :)  Also, I didn't put the hints under
"help".. that's too boring.  I actually put an object called "magic clue
book" in the game that the player can pick up and read. :)  I shall post
it later for everyone.

-- 
--- Sam Hulick ------------- shulick@indiana.edu ---------------------
Systems Consultant        | Homepage:
Indiana College Placement |    http://copper.ucs.indiana.edu/~shulick/
  and Assessment Center   | PGP public key available on request
