> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/functions/controller-functions.md).

# Controller Functions

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

| 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**              | Blocks 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](/gpcscripting/gpc-script-guide/gpc-developer-guide/functions/console-functions/core-console-functions.md)

***

### 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](/gpcscripting/gpc-script-guide/gpc-developer-guide/functions/controller-functions/rumble-functions.md)

***

### 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](/gpcscripting/gpc-script-guide/gpc-developer-guide/functions/controller-functions/led-functions.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/functions/controller-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
