A.G.S. v2.21
Text Script Commands Manual by Spyros

Main Page
Character

Cursor
Dialogue
Display
File
Game
GUI
Inventory
Music,Sound,Flic

Palette
Object

Room
Screen
String

 

DisableCursorMode (int mode)
Disables the mouse cursor MODE. Any attempts to set the cursor to this mode while it is disabled (like using SetMouseCursor) will fail. This function also greys out and disables any interface buttons whose left-click command
is set as "Set mode X", where X is equal to MODE.
If the current cursor mode is MODE, then the engine will change it to the next enabled standard cursor.
Example:
DisableCursorMode(4);

EnableCursorMode (int mode)
Re-enables the mouse cursor mode MODE. This function also enables any interface buttons which were disabled by the DisableCursorMode command.
Example:
EnableCursorMode(4);

GetCursorMode()
Returns the value of the current mode of the cursor. This is either MODE_LOOK, MODE_USE, MODE_TALK or any custom modes you have created.
Example:
GetCursorMode();

RefreshMouse ()
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 RefreshMouse will update the variables.
Example:
RefreshMouse();

SetCursorMode(int new_mode)
Changes the mouse cursor mode to NEW_MODE. The number you pass can be obtained from the VISUAL>CURSORS tab of the Room Editor. This function changes both the appearance of the cursor and the mode used if the player clicks on a hotspot.
Example:
SetCursorMode(4);

SetDefaultCursor()
Changes the appearance of the mouse cursor to the default for the current cursor mode. Use this to restore the cursor picture after you changed it with the SetMouseCursor function.
Example:
SetDefaultCursor();

SetMouseCursor(int new_cursor)
Changes the appearance of the mouse cursor to NEW_CURSOR. Unlike the SetCursorMode function (see above), this does not change the mode used if the user clicks on a hotspot. This is useful for displaying a "wait" cursor temporarily.
SetMouseCursor(6);

GLOBAL VARIABLES

*mouse.x
Mouse X co-ordinate when the script was started (0-319)
Example:
mouse.x=135;

*mouse.y
Mouse Y co-ordinate when the script was started (0-199)
Example:
mouse.y=34;