'Press enter to continue' command

For a text adventure I need to show the player some lines of text then have the player push any key on his keyboard to continue and the next few lines of text will appear. Is there a quest command to do this?

It would be useful so that player reads a certain number of lines of text at a time for either the room description or a msg(" ") command.


There's a wait command; I think "Wait for key press" on the GUI; I think it's in the 'output' section.
It replaces the command bar with a message (I think it's "Press a key to continue"), and the player can press a key or click on it.

There are other ways to do this with javascript, but that's the built-in option.


Hi mrangel.

I tried using the pause command as you suggested by I got this message:
The Pause function is obsolete as of Quest 5.5

I'd welcome any other suggestions thanks.


Pause?

I suggested using the wait command.


Hi mrangel

Opps my mistake.
I tried wait as you suggested but I'm not certain if I'm using the wait command correctly.
msg ("This is line one")
wait
msg ("This is line two")

I want the first message to display then after the player presses a key I want the second message to display
At the moment both messages display then there is a 'continue' word under the box the player enters commands into.


You want:

msg ("This is line 1.")
wait {
  msg ("This is line 2.")
}

In a similar way to ShowMenu, the wait block makes a note of a script to run after the button is clicked. (But I think wait also saves the scope frame, so your local variables stay around. Not 100% sure about that, because I've not really used it)


Thanks mrangel.
That works the way I want it to.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums