Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: guga2112 on Wed 19/02/2020 12:06:29

Title: [SOLVED] Skipping text via keyboard... but not ALL keys?
Post by: guga2112 on Wed 19/02/2020 12:06:29
Is it possible to leave the speech skip via keyboard, but not all the keys?

I'm testing my Steam build and I can't get a screenshot of my character speaking, because the text is skipped as soon as I press F12 to take a snapshot via Steam.

If not, I'll probably switch to mouse and timer.

EDIT: Solved it! I set the game to skip only by mouse and timer, and then put this on my repeatedly_execute_always:

Code ("Adventure game studio") Select

if(IsKeyPressed(eKeyF) && player.Speaking)
{
    Speech.SkipStyle = eSkipKeyMouseTime;
}
else
{
    Speech.SkipStyle = eSkipMouseTime;
}


Now it skips also via keyboard, but only if I press F. I'll probably put there an OR combination of esc, backspace, space, enter and dot instead of F.
Title: Re: [SOLVED] Skipping text via keyboard... but not ALL keys?
Post by: Khris on Wed 19/02/2020 17:36:01
You can use this in game_start:
Code (ags) Select
  game.skip_speech_specific_key = eKeyF;
Title: Re: [SOLVED] Skipping text via keyboard... but not ALL keys?
Post by: guga2112 on Wed 19/02/2020 17:44:34
Thanks, that's something I didn't know (and does not appear in the editor's autocomplete). But this restricts it to only one key, and I want a handful, so I think I'll keep my repeatedly_execute_always workaround