---
title: Controller Functions
slug: gpc/gpc-scripting-controller-functions
description: Here is the list of Controller Functions.
icon: ◼️
docTags: 
createdAt: 2021-12-04T12:30:38.000Z
---

A controller is an input device, however, the Cronus Zen also sends data to control the rumble motors and LEDs.&#x20;

| Function Name      | Description                                                                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| get\_val           | Returns the current value of a controller entry.                                                                                            |
| get\_lval          | Returns the previous value of a controller entry.                                                                                           |
| get\_ptime         | Returns the elapsed time of a controller entries state change.                                                                              |
| get\_controller    | Returns the type of controller currently connected to the input port.                                                                       |
| get\_battery       | Returns the current status of the battery for a wireless controller.                                                                        |
| event\_press       | Returns TRUE when a controller entry has been pressed.                                                                                      |
| event\_release     | Returns TRUE when a controller entry has been released.                                                                                     |
| get\_ival          | Gets the input value of a button.                                                                                                           |
| get\_brtime        | Gets the time the input value has been 0.                                                                                                   |
| swap               | Swaps the input values to be sent to the console temporarily.                                                                               |
| block              | locks the input from being sent to the console for the specified time.                                                                      |
| sensitivity        | Changes the input sensitivity.                                                                                                              |
| deadzone           | Modifies the inner "deadzone", and essentially pushes the starting value (when not 0) from the center by deadzone\_x/deadzone\_y or radius. |
| stickize           | Modifies outer deadzone, essentially forces the stick to not be further out than the radius from the inner point.                           |
| ps4\_touchpad      | Returns detailed information on the DualShock 4 touchpad state.                                                                             |
| ps4\_set\_touchpad | Touches the DualShock 4 touchpad in a specific (X, Y) position.                                                                             |
| turn\_off          | Turns off a wireless controller connected to the input port.                                                                                |
| wiir\_offscreen    | Checks if the Wii remote is off-screen.                                                                                                     |

Controller functions for Core Controller Functions can be found here: [Core Controller Functions](docId:05culJGgGOcUK_dDW4sNU)&#x20;

# Rumble Functions

| Function Name | Description                                                                     |
| ------------- | ------------------------------------------------------------------------------- |
| get\_rumble   | Returns the current value of a Rumble Motor.                                    |
| set\_rumble   | Sets the speed of a Rumble Motor.                                               |
| block\_rumble | Blocks any rumble signals from the console.                                     |
| reset\_rumble | Resets the rumble state and returns the condition of the motors to the console. |

Controller functions for Rumble Functions can be found here: [Rumble Functions](docId\:L5u2t8f0L35BlB1y3LP6R)&#x20;

# LED Functions

| Function Name | Description                                |
| ------------- | ------------------------------------------ |
| set\_led      | sets the state of the LED on a controller. |

Controller functions for LED Functions can be found here: [LED Functions](docId\:z1QvPHAsU6qdl9VFxOw4V)&#x20;

