> 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/console-functions/core-console-functions.md).

# Core Console Functions

| **Function Name**    | **Description**                                                                 |
| -------------------- | ------------------------------------------------------------------------------- |
| get\_console         | Gets which console is currently connected.                                      |
| set\_val             | Sets the output value to send to the console.                                   |
| set\_polar           | Sets the stick output at a given angle and radius with a high-resolution value. |
| block\_all\_inputs   | Blocks all output from being sent to the console this cycle of main.            |
| ps4\_authtimeout     | Check if ps4 authentication is timed out.                                       |
| output\_reconnection | Check the output if reconnected.                                                |
| output\_protocol     | Sets Output protocol.                                                           |
| get\_led             | Returns the current state of a specified LED.                                   |
| get\_rumble          | Returns the current value of a rumble motor.                                    |

***

### get\_console

get\_console returns a value that represents the console the Cronus Zen is currently connected to.

Syntax

get\_console();

Parameters

None

Returns

A value representing the console type.

***

### set\_val

set\_val overwrites the current value of a controller entry with the value that is specified in its second parameter. Whatever the output is from the controller for the specified button/axis, the set\_val command will overwrite that value with the value you specify.

It is mainly used in combos to set buttons in sequence, however, it can also be used in the main or user created function. For example, to create Hair Triggers:

Code-Snippet

```
main {
    if(get_val(XB1_RT) > 10) {
        set_val(XB1_RT, 100);
    }
}
```

Syntax

set\_val( \<identifier>, \<value> );

Parameters

\<identifier> : The controller entry identifier (e.g., XB1\_RT, PS4\_R2).

\<value> : The value to set, ranging from -100 to 100.

Returns

Nothing

***

### set\_polar

set\_polar sets the stick output at a given angle and radius with a high-resolution value.

Syntax

set\_polar( \<stick>, \<angle>, \<radius> );

Parameters

\<stick> : POLAR\_LS or POLAR\_RS.

\<angle> : Angle from 0 to 359.

\<radius> : Radius value.

Returns

Nothing

***

### block\_all\_inputs

block\_all\_inputs blocks all output from being sent to the console this cycle of main.

Syntax

block\_all\_inputs();

Parameters

None

Returns

Nothing

***

### ps4\_authtimeout

ps4\_authtimeout returns the authentication timeout status on the PS4 in the form of an int. Note: This function is largely redundant since Firmware 1.20 and above as Partial PS4 cross-over support is no longer required.

It can be used to script a warning when the Zen is close to automatically disconnecting/reconnecting on a PS4.

Syntax

ps4\_authtimeout();

Parameters

None

Returns

An integer representing the timeout status.

***

### output\_reconnection

Check the output if reconnected.

Syntax

output\_reconnection();

Parameters

None

Returns

Status of the reconnection.

***

### output\_protocol

Sets the Output protocol for the device.

Syntax

output\_protocol( \<protocol> );

Parameters

\<protocol> : The output protocol constant.

Returns

Nothing

***

### get\_led

Returns the current state of a specified LED (on/off/brightness).

Syntax

get\_led( \<led\_id> );

Parameters

\<led\_id> : The identifier for the LED.

Returns

The state of the LED.

***

### get\_rumble

Returns the current value of a rumble motor.

Syntax

get\_rumble( \<rumble\_id> );

Parameters

\<rumble\_id> : The identifier for the rumble motor.

Returns

The current rumble value.


---

# 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, and the optional `goal` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/functions/console-functions/core-console-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
