qbasic.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
STICK Function
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Returns the coordinates of a joystick.
 
STICK(n%)
 
    ■ n%    Indicates the coordinate returned:
 
            n%    Returns
            ══    ══════════════════════════
            0     x coordinate of joystick A
            1     y coordinate of joystick A
            2     x coordinate of joystick B
            3     y coordinate of joystick B
 
    ■ You must call STICK(0) before STICK(1), STICK (2), or STICK(3).
      STICK(0) records the current coordinates.
 
Example:
    Temp% = STICK(0)
    PRINT STICK(2), STICK(3)
 
See Also    STRIG Function    STRIG, ON STRIG Statements