Author Topic: MODULE: DoubleClick + KeyListener: detect double clicks and more  (Read 5503 times)

But with Display command it's different, in AGS key presses won't be registered at all while Display is active on screen. What you may probably do is to set special key to skip Display right before starting one and set it back to your normal defaults right after.

Thanks for the quick answer! Yes, I've been thinking to use a GUI if the Display command causes troubles.

I tried using your code, but got an error "skip_speech_specific_key' is not a public member of 'GameState'". I'm not sure if I used it correctly...

I tried using your code, but got an error "skip_speech_specific_key' is not a public member of 'GameState'". I'm not sure if I used it correctly...

Oh sorry, I got confused, this variable was turned into Speech.SkipKey property, but it's not applied to Display anyway, so won't be useful here.

Ok, no problem. I tried to use this when pressing spacebar, but got nowhere:
   
Code: Adventure Game Studio
  1.       int old_skip_display = game.skip_display;
  2.       int old_skip_key = Speech.SkipKey;
  3.    
  4.       game.skip_display = eSkipKey;
  5.       Speech.SkipKey = eKeyA;
  6.    
  7.       Display("GAME PAUSED %s",
  8.       "[[Press any key to continue");
  9.       game.skip_display = old_skip_display;
  10.       Speech.SkipKey = old_skip_key;    

It doesn't give any errors, but I can't see any effect either. I'm probably using this wrong! I may have to change the pause system, so that it uses a GUI. Just annoying because the simple Display works almost perfect.

Like I said, Speech.SkipKey does not apply to Display (it applies only to speech). So this method won't work.

Display have many problems in AGS, notably it blocks every script event, even repeatedly_execute_always. This is why it is practically impossible to customize its behavior.

Ok, thanks for the clarification! I know now not to spend anymore time fighting this issue, and switch to Gui.