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 (Syntax Highlighting.) |
||
| (One intermediate revision by the same user not shown) | |||
| 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=== | |
| − | + | <syntaxhighlight lang="lua" line> | |
| + | x, y = getMousePos() | ||
| + | </syntaxhighlight> | ||
{{LuaSeeAlso}} | {{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()