Stick Function

Purpose

Reads joystick or touch screen position.

Syntax

% = Stick(n)

Description

Stick returns the position of the multi-media input device in pixels. The range is from 0 to 65535, from the left-top to the right-bottom.

Stick(0) - Reads the horizontal position (x-coordinate) of the joystick #1

Stick(1) - Reads the vertical position (y-coordinate) of the joystick #1

Stick(2) - Reads the horizontal position (x-coordinate) of the joystick #2

Stick(3) - Reads the vertical position (y-coordinate) of the joystick #2

Stick(1) .. Stick(3) are the positions stored at the time of the last Stick(0). That means that a Stick(0) is needed to really read both sticks positions.

Example

~Stick(0)

Print Stick(2), Stick(3)

See Also

Strig

{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}