Poll Input

Returns the value associated with an input element.


value = Poll Input (elementID)


At the present time, this command does not work on Mac OS X, due to its reliance on Input Sprocket which has been discontinued.

This function is used to get the value of an input element defined in an input resource. To use this command an input resource must be loaded (see Load Input) and TNT Basic must be in input mode (see Activate Input and Deactivate Input).

elementID refers to the input device in the currently loaded input bank (starting from 0 upwards).

value is the value of that device.

For a button it returns:
0 = Not Pressed
1 = Pressed

For a dpad it returns:
0 = Idle
1 = Left
2 = Up-Left
3 = Up
4 = Up-Right
5 = Right
6 = Down-Right
7 = Down
8 = Down-Left

For an x axis it returns in the range:
-100 = Maximum Left
0 = Middle
100 = Maximum Right

For a y axis it returns in the range:
-100 = Maximum Up
0 = Middle
100 = Maximum Down

Table of contents