[ EndTimer; return 1; ];
[ Delay t k; read_char 1 t #r$EndTimer k; ];
Put those into your code somewhere and then you can call DELAY(n) where n is
the number of seconds (I've heard seconds are not necessarily accurate in
z-machine though, so don't count on exact precision) you want to pause.
The biggest limitation of this routine is that if a key is pressed the pause
aborts immediately... so it can't FORCE a pause, but as long as no keys are
pressed it will wait for however many seconds you ask it to.
Here's a quick (annoyingly) hacked "shell" Demo if anyone wants to give it a
quick try (has to be an advanced story to use the read_char function)...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Switches dsv5x;
Constant Story "SHELL";
Constant Headline "^An non-Interactive Delay Timer Test.^";
Include "Parser";
Include "VerbLib";
Object Blank_Room "Blank Room"
with description "An empty room."
has light;
[ EndTimer; return 1; ];
[ Delay t k; read_char 1 t #r$EndTimer k; ];
[ Initialise;
location=Blank_Room;
Print "^^^^^Wel"; delay(1);
Print "come "; delay(2);
print "to "; delay(2);
print "the "; delay(2);
print "horribly "; delay(5);
print "annoyingly "; delay(5);
print "delayed "; delay(5);
print "shell"; delay(1);
print "."; delay(1); print "."; delay(1); print "."; delay(1);
"^^";
];
Include "Grammar";
end;
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--- ...with love and a banana fish. <as544@torfree.net>