spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Mouse functions and properties

Update

(Formerly known as RefreshMouse, which is now obsolete)

Mouse.Update();
Updates the global variables "mouse.x" and "mouse.y" with the current position of the mouse. Normally, these variables are set just before each script function is executed. However, if you have a very long script where the mouse may have moved since the start of the function, and you need the exact current location, then this command will update the variables.

Example:

Display("The mouse was at: %d, %d.", mouse.x, mouse.y);
mouse.Update();
Display("The mouse is now at: %d, %d.", mouse.x, mouse.y);
will display the mouse position just before each dialog box is displayed

User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.