> The title here should be self-explanatory. Basically, I can't get Inform
> to end the game immediately after the call to my DarkToDark routine (which
> is supposed to kill the player). It does so, but not until after printing
> the description of the next dark room the player enters. I find the
> appearance incredibly tacky-looking, and was wondering if there was any
> way around it.
It is interesting to note that the Inform port of "Advent" has the
same problem. Has the library's behaviour changed, or has it always
been like that? Anyway, as far as I can see the relevant part of the
library - GoSub in VerbLib.h - looks like
if (df~=0) { location=j; lightflag=1; }
else
{ if (location==thedark) DarkToDark();
real_location=j;
location=thedark; lightflag=0;
}
if (AfterRoutines()==1) rtrue;
if (keep_silent==1) rtrue;
LookSub(1);
];
Obviously, what you want to do is to prevent the call to LookSub(1)
from happening if the call to DarkToDark() killed the player.
So the method that seems most elegant to me is to make sure that the
keep_silent variable is set to 1. The only place in the library that
sets it back to 0 seems to be RTakeSub(), so there shouldn't be much
danger of AfterRoutines() undoing what DarkToDark() has done.
And since the player will be dead anyway, there shouldn't be any bad
consequences of letting keep_silent stay 1, so simply defining the
DarkToDark() function something like
[ DarkToDark;
deadflag = 1;
keep_silent = 1;
"Do the words ~Lurking Grue~ strike terror into your heart? \
Well, they should.";
];
If, for some reason, this doesn't work, you could make sure that the
AfterRoutines() function returns 1, for instancey by defining the
GamePostRoutine() - which is called by AfterRoutines() -- to do
something like
[ GakePostRoutine;
if (deadflag ~= 0) rtrue;
rfalse;
];
But somehow, this seems like the uglier solution to me. Oh well, I
hope you'll get at least one of these ideas to work.
_
Torbjorn Andersson