I6 trouble with keyboard (solved!)

I tried to do a kind of an “interactive” real-time pause to a game where the player does something that takes longer than one turn. The trouble was I could’t get to the (real-time) pause from outside Keyboard or KeyboardPrimitive, that is from within the verb routines so that the “activity” routine (code below) would’ve ended in the action returning in success: “And find a casket!”

dig it
You dig… (real time pause plus 1 turn)
And dig… (real time pause plus 1 turn)
And dig… (real time pause plus 1 turn)
And find a casket!

The DM4 examples 129-133, the Time and Dwarves example game have something like this, but I couldn’t do it. Any ideas? :open_mouth:

[code][ activity t a;
while (t > 1) {
give player acting;

! number of turns
t --;

! ie. “Digging…” this is the part where I tried to pause the game for a while
if (player has acting) print (string) a;


! something interrupts
if (player hasnt acting)
! finished
give self ~acting;

Sorry, not sure I understand the question: you want to be able to pause the game for, say, one second of real time, and after that more text shows up?
If so, you want KeyDelay(n), where n is the number of tenths of seconds the game will wait (so, KeyDelay(10) = 1 sec).

Thanks a million mulehollandaise!
It worked perfectly.


waits time tenths of a second for a single key. If no key is pressed within that period it returns zero; otherwise it returns the character from 1-255.