GetMousePosition (Harvest)
From OxeyeWiki
(Difference between revisions)
(Created page with '{{HarvestMethod | screenX, screenY = getMousePosition() | Returns the current mouse position, in screen coordinates. | | Returns two coordinates of a point on the screen, sc...') |
|||
| Line 14: | Line 14: | ||
harvest.spawnChargeBomb(x, y) | harvest.spawnChargeBomb(x, y) | ||
</pre> | </pre> | ||
| + | |||
| + | === Resources === | ||
| + | *[http://www.oxeyegames.com/forum/viewtopic.php?p=1523#p1523 Oxeye Game Studio Forum - Harvest Functions] | ||
Latest revision as of 16:16, 2 December 2009
|
screenX, screenY = getMousePosition() | ||
|
Returns the current mouse position, in screen coordinates. | ||
| Parameter | Expected Type | Description |
| Returns | ||
|
Returns two coordinates of a point on the screen, screenX and screenY. Both are of the type Number. | ||
Example
local mouseX, mouseY = harvest.getMousePosition() local x,y = harvest.screenToWorldCoordinates(mouseX, mouseY) harvest.spawnChargeBomb(x, y)