Returns the current y location of the mouse. This is the distance from the top-left corner of the screen.

// fills a circle underneath the cursor
onEachFrame() do
    c = getControls()
    fillCircle( c.getMouseX(), c.getMouseY(), 12, true )

If the game player has been scaled, then this will automatically take this into account. This means that you do not have to worry about handling this; mouse positions will always be the same, no matter what size the game is played it. However as a result, this is capable of returning floating point numbers, if the game has been scaled.

See also

getMouseX - getMouseXY