FANDOM


Syntax

MOUSE

Explanation

MOUSE outputs the current mouse coordinates in a list of two numbers representing the x coordinate and the y coordinate. If no mouse is present, the coordinates are always [0 0].

See also BUTTON? and .MOUSEON.

Example

The following procedure uses the mouse to move the turtle. When the left mouse button is held down, the turtle will draw as it moves. Press the right mouse button to end the procedure.

TO CHASE

LABEL "L
IF BUTTON? 1 THEN PD ELSE PU
SETXY MOUSE
IF NOT BUTTON? 2 THEN GO "L

END

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.