cursor( x, y )

Sets the text cursor position for print().

The x coordinate of the upper left corner.
The y coordinate of the upper left corner.

The draw state maintains a cursor location for printing text with the print() function. Pico-8 uses this to maintain a scrolling display, especially for the command prompt.

The cls() function resets the cursor position to (0, 0). Calling print() with explicit coordinate arguments sets the cursor to that location.

See print() for an explanation of the text cursor behavior.

Examples Edit

-- set the cursor position to (20, 24).
cursor(20, 24)

print('line one')
print('line two')
print('line three')

See also Edit

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.