Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: manny.p on Tue 21/06/2005 21:53:37

Title: How do i disable then re-enable text skipping? (ESC)
Post by: manny.p on Tue 21/06/2005 21:53:37
I want to stop text skipping in fact all input from the user.

I tried :
DisableInterface();

but they can still text skip, only guis don't work.

see my problem is is with walking, when the user presses eascape, the character stops walking from A to B.

i don't want to use block either because i want the other function to run while the character is walking:

character[EL].Say("Guybrush!");
character[EL].Walk(149, 111);
character[EGO].Say("Yes it's me my SugarCake");  << still want this to be said while she is walking but without it being able to skip using (esc)


basically: EL finish walking without being able to skip it, but without stopping EGO saying his line while EL walks
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: Ashen on Tue 21/06/2005 23:20:00
I think you want the game.skip_display variable:

Quote from: The Manual
game.skip_display:
Setting for how Display() messages are skipped; valid values are same as for SetSkipSpeech (default 3). 

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

Just set it to 2 to disable skipping, then back to 3.

It works fine for me, but Trisk had some trouble with it (see this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20522.0)) - don't know if he got it sorted. Give it a try, though.
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: manny.p on Wed 22/06/2005 13:21:07
Don't work.

I have :
game.skip_display=2;

in my before fadine script and it doesn't work.

is there anything i'm doing wrong?
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: Ubel on Wed 22/06/2005 13:29:07
I think Ashen misunderstood your guestion. The thing you need is SetSkipSpeech.

QuoteSetSkipSpeech
SetSkipSpeech (int new_mode)

Changes whether the player can skip speech text by clicking the mouse. This option is initially set in a checkbox in the Main tab of the editor, but this function allows you to change it at run-time. The value of NEW_MODE means the following:
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

Example:
SetSkipSpeech(2);

will make the player unable to skip the text by pressing a mouse button or a key.

I hope this helps.
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: Ashen on Wed 22/06/2005 15:30:25
Man, I'm dumb sometimes. I got it in mind that it was like Trisk's problem, and completely missed the fact that it was the SetSkipSpeech bit that was relevant, not game.skip_display. Sorry about that manny.p, and nice pick-up Pablo. That was what I meant to say.

(I blame the heat. I'm English, I'm not used to hot weather.)
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: manny.p on Wed 22/06/2005 16:40:16
The weathers great, i feel annoyed that i'm making this game this time of year.

I just don't want it to be cold and rainy (global warming wil soon sort that out).
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: manny.p on Thu 23/06/2005 14:41:01
Is it possible to do:

SetSkipSpeech(1);

So they skip by kep, but can i do it so it can only be skipped by ESC?
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: strazer on Thu 23/06/2005 15:06:12
Put
  game.skip_speech_specific_key = 27; // ESC
in the game_start function.
Title: Re: How do i disable then re-enable text skipping? (ESC)
Post by: manny.p on Thu 23/06/2005 18:20:11
Excellant it works!