Disabling keypress removing text windows?

Started by JD, Fri 22/09/2006 20:30:29

Previous topic - Next topic

JD

My character is moved around using the keyboard, and you use spacebar to look at things/use things/talk to people. It works nicely, but when I use Display to display some text about an object the character looks at (for example), the text is removed immediatly if you keep the spacebar pressed just a bit too long. Is it somehow possible to disable keypresses removing text windows?

Thanks in advance...

Khris

Don't know if that's possible without having to use a custom display-GUI, but you could do the following:
function MyDisplay(String message) {
Ã,  while(IsKeyPressed(32)) {
Ã,  Ã,  Wait(1);Ã,  Ã,  Ã, // wait until spacebar is released
Ã,  }
Ã,  Display("%s", message);
}

Ashen

It should be possible. From the manual:
Quote
game.skip_display
Setting for how Display() messages are skipped; valid values are same as for SetSkipSpeech (default 3).

And those values are:
Quote
0  player can skip text by clicking mouse or pressing key
1  player can skip text by pressing key only, not by clicking mouse
2  player cannot skip text with mouse or keyboard
3  text does not time-out; player must click mouse or press key each time
4  player can skip text by clicking mouse only, not by pressing key

So setting it to 2 or 4 sould solve your problem.
I know what you're thinking ... Don't think that.

JD


SMF spam blocked by CleanTalk