Difference between revisions of "Lua:getMousePos"
Jump to navigation
Jump to search
m (Syntax Highlighting.) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | < | + | [[Category:Lua]] |
| + | {{CodeBox|'''function''' getMousePos()}} | ||
| + | |||
| + | Returns 2 parameters: the x-position and y-position of the mouse on the screen. | ||
| + | |||
| + | {{LuaFunctionParametersNone}} | ||
| + | |||
| + | ===Example=== | ||
| + | <syntaxhighlight lang="lua" line> | ||
| + | x, y = getMousePos() | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | {{LuaSeeAlso}} | ||
| + | |||
| + | {{KeyboardMouse}} | ||
Latest revision as of 20:16, 25 June 2026
Returns 2 parameters: the x-position and y-position of the mouse on the screen.
Function Parameters[edit]
<none>
Example[edit]
1 x, y = getMousePos()