Character.Say implicit input ignore delay

Started by remz, Mon 26/07/2021 02:02:35

Previous topic - Next topic

remz

Hello AGS tech friends,

I am using AGS 3.5.1 and wondering if someone could confirm and/or explain why some of my inputs (mouse click and keyboard keys) are seemingly ignored for a brief duration after any "character.Say" command.
I've tried on a blank new project on an empty template to confirm and the problem also happens.
My script is:
Code: ags
function hHotspot1_AnyClick()
{
  player.Say("Hello!");
}

function room_AfterFadeIn()
{
  mouse.Mode = eModeLookat;
}

How to reproduce the issue:

  • Click on something to have the character say something. For example: saying "Hello" on a hotspot. Since the string is short, the problem can be reproduced faster
  • Wait until the character's text disappears due to automatic say timer
  • Immediately after the text disappears, click on the same hotspot to retrigger the same event
Result: The event won't happen. For approximately one second, all keyboard inputs and mouse clicks are ignored and apparently not receive by AGS. It looks like the engine is "eating" them. By clicking quickly, I was able to get 4 clicks ignored.

Please note that if you click while the 'say' is ongoing, it gets interrupted (as expected) and it such case, clicking again on the hotspot will correctly and instantly trigger. The problem I am trying to describe seems to only happen if the 'say' command completed and was ended by the internal say timer.

Thank you very much for your help!
Remz

Cassiebsg

That is intended behavior, but can be adjusted. Check the manual for Game.IgnoreUserInputAfterTextTimeoutMs, and play with it a bit to see if it "fixes" your problem. However, make sure you really want to "eliminate" this, as you risk players accidentally clicking the next line away before they had a chance to read it.
There are those who believe that life here began out there...

remz

Thank you very much, it is exactly that and indeed it fixes my "issue".
I'll definitely read more on the manual in the "Game.*" section, since I am puzzled regarding why many of these properties don't seem to be reflected in the "General Settings" property page of the project.

Thanks again for your quick reply :)
RemV

SMF spam blocked by CleanTalk