Mouse.posn

From AGI Wiki
Revision as of 14:07, 11 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''mouse.posn''' command polls the mouse for its current position. == Syntax == mouse.posn(var vA, var vB); == Remarks == Details of mouse in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The mouse.posn command polls the mouse for its current position.

Syntax

mouse.posn(var vA, var vB);

Remarks

Details of mouse input on non-PC systems has not been fully explored.

Possible Errors

NOTE: In the PC version of AGI, this command points to a null function, but the null function does not accept arguments. If you use this command on a PC, AGI will treat the argument value intended for this command as the byte value for the next command, which will almost always crash AGI. Do NOT use this command if you intend to run your game on a PC platform.

Example

Code:
mouse.posn(v50, v51);
print("mouse position is (%v50, %v51)");

Technical Information

Required Interpreter Version: Available in version 3.002.098 and above.
Byte-Code Value: 180 (0xB4 hex)

See Also

Player Input Commands
Mouse Input