Re: Quick Inform one-shot messages-- how?


Thu, 24 Aug 1995 11:13:31 -0400

lazuli@eskimo.com (Fred Sloniker) writes:
> I'd like to put a mechanism in my evolving game that would allow it to
> make some funny response the first time the player tries something
> pointless, then a duller response on further tries, sort of like the
> way it keeps track of rooms you've already seen. I know Infocom did
> something like this with their 'Invisiclues' in-game hints (keeping
> track of which hints you'd already seen). Is there some
> straightforward way to do this without assigning 14 zillion variables?

No. Well, you could create an array with 14 zillion entries, or create
14 zillion dummy objects and assign their attributes. There's no
built-in magic to do what you want though.

Probably an array would be easiest to keep track of. And a helper
function, so you could say
if (IsFirstMessage(13)==0) "You look like a loon, you loon.";
else "Nothing happens.";

Where IsFirstMessage(n) checks the n'th element of an array, sets the
element to 1, and returns the original value.

--Z

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."