Difference between revisions of "Lua:getMousePos"
Jump to navigation
Jump to search
m (Reverted edits by This content is not available (Talk) to last revision by TheyCallMeTim13) |
m (Added CodeBox Template.) |
||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | '''function''' getMousePos() | + | {{CodeBox|'''function''' getMousePos()}} |
| − | Returns 2 parameters | + | Returns 2 parameters: the x-position and y-position of the mouse on the screen. |
| − | + | {{LuaFunctionParametersNone}} | |
| − | |||
| − | |||
| − | + | ===Example=== | |
| − | + | <pre> | |
| + | x, y = getMousePos() | ||
| + | </pre> | ||
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| − | + | {{KeyboardMouse}} | |
| − | |||
Latest revision as of 23:53, 4 December 2025
| <> Function function getMousePos() |
Returns 2 parameters: the x-position and y-position of the mouse on the screen.
Function Parameters[edit]
<none>
Example[edit]
x, y = getMousePos()
See also[edit]
| Lua |
| Script Engine |
Related Functions[edit]
| getMousePos |
| setMousePos |
| isKeyPressed |
| keyDown |
| keyUp |
| doKeyPress |
| mouse_event |
| setGlobalKeyPollInterval |
| setGlobalDelayBetweenHotkeyActivation |