GetMousePosition (Harvest)

From OxeyeWiki

Revision as of 16:16, 2 December 2009 by 166 MMX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Harvest Library

Example

local mouseX, mouseY = harvest.getMousePosition()
local x,y = harvest.screenToWorldCoordinates(mouseX, mouseY)
harvest.spawnChargeBomb(x, y)

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox