Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SilverSpook on Wed 14/12/2016 20:58:08

Title: Don't execute script when mouse is in eModeWait
Post by: SilverSpook on Wed 14/12/2016 20:58:08
I'm having trouble getting a repeatedly_execute_always() script to stop displaying a 'hover label' during cutscenes, when the mouse goes into eModeWait.

Code (ags) Select

  if(mouse.Mode != eModeWait)
  {
    //Show the label
  }
  else
  {
    //Don't show the label
  }



The thing is, even when the game is blocked, the label is still shown.  Is there some other way to tell whether the game is being blocked at the moment?  Thanks.
Title: Re: Don't execute script when mouse is in eModeWait
Post by: Scavenger on Wed 14/12/2016 21:06:32
I believe it's:

Code (AGS) Select

if (IsInterfacedEnabled())
{
//Show label
}
else
{
//Don't show label
}


Because:
QuoteIsInterfaceEnabled()

Returns 1 if the player interface is currently enabled, 0 if it is disabled. The user interface is disabled while the cursor is set to the Wait cursor - ie. while the character is performing a blocking Walk, or other blocking action.