Liberty BASIC Help Online

READJOYSTICK
READJOYSTICK 1
or
READJOYSTICK 2
 
Description:
You can read the position of up to two joysticks and their buttons. The readjoystick command reads the x, y, and z of an installed joystick (proper drivers must also be installed) and also their buttons. The variables are visible everywhere because they are global.
 
Usage:
 
  readjoystick 1
 
The command above reads the current status of joystick 1 and places the values into these global variables:
 
  Joy1x, Joy1y, Joy1z, Joy1button1, Joy1button2
 
 
  readjoystick 2
 
The command above reads the current status of joystick 2 and places the values into these global variables:
 
  Joy2x, Joy2y, Joy2z, Joy2button1, Joy2button2


Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/