Functions for getting information about controllers, as well as functions to control rumble. More...
Public Member Functions | |
| integer | GetCount () |
| Gets the amount of connected controllers in the device. | |
| boolean | IsConnected (integer controllerIndex) |
| Gets whether the controller at the index is connected. | |
| boolean | IsXbox (integer controllerIndex) |
| Gets whether the controller at the index is an Xbox controller. | |
| boolean | IsPlayStation (integer controllerIndex) |
| Gets whether the controller at the index is a PlayStation controller. | |
| boolean | IsJoyCon (integer controllerIndex) |
| Gets whether the controller at the index is a Nintendo Switch Joy-Con L or R. | |
| boolean | HasShareButton (integer controllerIndex) |
| Gets whether the controller at the index has a Share or Capture button. | |
| boolean | HasMicrophoneButton (integer controllerIndex) |
| Gets whether the controller at the index has a Microphone button. | |
| boolean | HasPaddles (integer controllerIndex) |
| Gets whether the controller at the index has paddles. | |
| boolean | IsButtonHeld (integer controllerIndex, Button button) |
| Checks if a button is held. | |
| boolean | IsButtonPressed (integer controllerIndex, Button button) |
| Checks if a button is pressed. | |
| boolean | GetButton (integer controllerIndex, Button button) |
| Gets the button value from the controller at the index. | |
| decimal | GetAxis (integer controllerIndex, Axis axis) |
| Gets the axis value from the controller at the index. | |
| Controller | GetType (integer controllerIndex) |
| Gets the type of the controller at the index. | |
| string | GetName (integer controllerIndex) |
| Gets the name of the controller at the index. | |
| void | SetPlayerIndex (integer controllerIndex, integer playerIndex) |
| Sets the player index of the controller at the index. | |
| boolean | HasRumble (integer controllerIndex) |
| Checks if the controller at the index supports rumble. | |
| boolean | IsRumbleActive (integer controllerIndex) |
| Checks if rumble is active for the controller at the index. | |
| void | Rumble (integer controllerIndex, number strength, integer duration) |
| Rumbles a controller. | |
| void | StopRumble (integer controllerIndex) |
| Stops controller haptics. | |
| boolean | IsRumblePaused (integer controllerIndex) |
| Checks if rumble is paused for the controller at the index. | |
| void | SetRumblePaused (integer controllerIndex) |
| Pauses or unpauses rumble for the controller at the index. | |
| void | SetLargeMotorFrequency (integer controllerIndex, number frequency) |
| Sets the frequency of a controller's large motor. | |
| void | SetSmallMotorFrequency (integer controllerIndex, number frequency) |
| Sets the frequency of a controller's small motor. | |
Functions for getting information about controllers, as well as functions to control rumble.
| decimal Controller.GetAxis | ( | integer | controllerIndex, |
| Axis | axis ) |
Gets the axis value from the controller at the index.
| controllerIndex | Index of the controller to check. |
| axis | Which axis to check. |
| boolean Controller.GetButton | ( | integer | controllerIndex, |
| Button | button ) |
Gets the button value from the controller at the index.
| controllerIndex | Index of the controller to check. |
| button | Which button to check. |
| integer Controller.GetCount | ( | ) |
Gets the amount of connected controllers in the device.
| string Controller.GetName | ( | integer | controllerIndex | ) |
Gets the name of the controller at the index.
| controllerIndex | Index of the controller to check. |
| Controller Controller.GetType | ( | integer | controllerIndex | ) |
Gets the type of the controller at the index.
| controllerIndex | Index of the controller to check. |
| boolean Controller.HasMicrophoneButton | ( | integer | controllerIndex | ) |
Gets whether the controller at the index has a Microphone button.
| controllerIndex | Index of the controller to check. |
| boolean Controller.HasPaddles | ( | integer | controllerIndex | ) |
Gets whether the controller at the index has paddles.
| controllerIndex | Index of the controller to check. |
| boolean Controller.HasRumble | ( | integer | controllerIndex | ) |
Checks if the controller at the index supports rumble.
| controllerIndex | Index of the controller to check. |
| boolean Controller.HasShareButton | ( | integer | controllerIndex | ) |
Gets whether the controller at the index has a Share or Capture button.
| controllerIndex | Index of the controller to check. |
| boolean Controller.IsButtonHeld | ( | integer | controllerIndex, |
| Button | button ) |
Checks if a button is held.
| controllerIndex | Index of the controller to check. |
| button | Which button to check. |
| boolean Controller.IsButtonPressed | ( | integer | controllerIndex, |
| Button | button ) |
Checks if a button is pressed.
| controllerIndex | Index of the controller to check. |
| button | Which button to check. |
| boolean Controller.IsConnected | ( | integer | controllerIndex | ) |
Gets whether the controller at the index is connected.
| controllerIndex | Index of the controller to check. |
| boolean Controller.IsJoyCon | ( | integer | controllerIndex | ) |
Gets whether the controller at the index is a Nintendo Switch Joy-Con L or R.
| controllerIndex | Index of the controller to check. |
| boolean Controller.IsPlayStation | ( | integer | controllerIndex | ) |
Gets whether the controller at the index is a PlayStation controller.
| controllerIndex | Index of the controller to check. |
| boolean Controller.IsRumbleActive | ( | integer | controllerIndex | ) |
Checks if rumble is active for the controller at the index.
| controllerIndex | Index of the controller to check. |
| boolean Controller.IsRumblePaused | ( | integer | controllerIndex | ) |
Checks if rumble is paused for the controller at the index.
| controllerIndex | Index of the controller to check. |
| boolean Controller.IsXbox | ( | integer | controllerIndex | ) |
Gets whether the controller at the index is an Xbox controller.
| controllerIndex | Index of the controller to check. |
| void Controller.Rumble | ( | integer | controllerIndex, |
| number | strength, | ||
| integer | duration ) |
Rumbles a controller.
| controllerIndex | Index of the controller to rumble. |
| strength | Rumble strength. (0.0 - 1.0) |
| duration | Duration in milliseconds. Use 0 for infinite duration. |
| void Controller.SetLargeMotorFrequency | ( | integer | controllerIndex, |
| number | frequency ) |
Sets the frequency of a controller's large motor.
| controllerIndex | Index of the controller. |
| frequency | Frequency of the large motor. |
| void Controller.SetPlayerIndex | ( | integer | controllerIndex, |
| integer | playerIndex ) |
Sets the player index of the controller at the index.
| controllerIndex | Index of the controller. |
| playerIndex | The player index. Use -1 to disable the controller's LEDs. |
| void Controller.SetRumblePaused | ( | integer | controllerIndex | ) |
Pauses or unpauses rumble for the controller at the index.
| controllerIndex | Index of the controller. |
| void Controller.SetSmallMotorFrequency | ( | integer | controllerIndex, |
| number | frequency ) |
Sets the frequency of a controller's small motor.
| controllerIndex | Index of the controller. |
| frequency | Frequency of the small motor. |
| void Controller.StopRumble | ( | integer | controllerIndex | ) |
Stops controller haptics.
| controllerIndex | Index of the controller to stop. |