INGAMEPORT

Synopsis
INGAMEPORT mask
Description

Reads the value (or resistance across) the game port channel specified by mask. The mask input must be either 1, 2, 4, or 8. If mask is 1, then INGAMEPORT reads the x-axis. If mask is 2, then INGAMEPORT reads the y-axis. If mask is 4, then INGAMEPORT reads the rudder. If mask is 8, then INGAMEPORT reads the z-axis. You can read the button states using INPORT 513.

INGAMEPORT outputs -1 if nothing is connected to the game port or if the mask input is an unsupported value.

Example

REPEAT 10000 [SHOW INGAMEPORT 1 WAIT 10]

Now move the Joystick around.


SourceForge.net Logo