TorqueScript Reference
Function Categories

Topics

 Audio
 Box Math
 Build Info
 Call Stack
 Color
 Console Output
 Cursor Management
 Datablocks
 Event Scheduling
 File System
 Font
 Image File Manipulation
 Input Management
 Mac Anti-Aliasing
 Math (Non-Vector)
 Matrix Math
 Memory Frames
 Message Box
 Message Queue (Dispatcher)
 Meta-Scripting
 Network
 Object
 Packages
 Path Expando
 Platform
 Random Numbers
 Resource Manager
 Serialization
 Server Query
 String
 String Fields
 Tagged Strings
 Telnet Console
 Telnet Debugger
 Texture Manager
 Unit Testing
 Utility
 Vector Math
 Vector2 Math
 Video
 Windows Platform
Boolean isJoystickDetected ()
String getJoystickAxes (instance)
Integer getJoystickCount ()

Detailed Description

Function Documentation

◆ getJoystickAxes()

String getJoystickAxes ( instance )

Use the getJoystickAxes function to get the current axes position (x and y ) of any intance of a joystick.

Parameters
instanceA non-negative number value selecting a specific joystick instance attached to this computer.
Returns
Returns a string containing the \x y\ position of the joystick.
See also
disableJoystick, enableJoystick, isJoystickDetected

◆ getJoystickCount()

Integer getJoystickCount ( )

Returns the total number of joysticks connected, both XInput and other.

Returns
The number of joysticks connected.
See also
isJoystickDetected

◆ isJoystickDetected()

Boolean isJoystickDetected ( )

addtogroup WindowsPlatform Windows Platform

Use the isJoystickDetected function to determine if one or more joysticks are connected to the system. This doesn't tell us how many joysticks there are, just that there are joysticks. It is our job to find out how many and to attach them.

Returns
Returns true if one or more joysticks are attached and detected, false otherwise.
See also
disableJoystick, enableJoystick, getJoystickAxes