Some definitive questions about Pause / Display()

Started by bx83, Sun 15/07/2018 10:14:54

Previous topic - Next topic

bx83

Let me ask you guys this.

Can I have:

-The P (or any key except Space/ESC) key become 'paused game' (eg. activates a Display() ); and the Space and ESC keys STAY as Skip (for speech)

And/Or:

-The left mouse click does NOT stay as Skip (for speech) -- something else skip's speech, the 'S' key for example; or nothing at all.

Follow up:
Is there any way to not have speech skip when you press space, or any mouse button, or anything?

Ask me if you require more specificity :P

Snarky

For context, bx83 and I discussed this a little over PM. In general, I believe Display() is the most powerful way to pause an AGS game (except for tabbing away from the game window in a game that isn't set to multitasking mode): it stops both blocking and non-blocking animations, and resumes them once dismissed. (I'm not sure exactly how this works in terms of which AGS threads it blocks and not.)

However, Display() cannot be called while speech is playing. And AFAIK there is no other way to pause the game while speech is playing, either, and no way to intercept keypresses/mouse clicks to have them do anything but skip the current line (depending on the game setting). And since there, quite sensibly, is no "none" dialog skip mode (neither mouse, keyboard nor timer), you can't get around it that way either.

So I would think that the best you can do (if you can poll IsKeyDown()/IsMouseButtonClicked() to detect the keypress/mouse click, which I'm not sure will work) is to both skip the line and then pause.

SMF spam blocked by CleanTalk