For the complete documentation index, see llms.txt. This page is also available as Markdown.

Console Functions

Function Name

Description

get_console

Gets which console is currently connected.

set_val

Sets the output value to send to the console.

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 (e.g., PS4, XB1, SWITCH, etc.).


set_val

set_val sets the output value of a controller entry (button or axis) to be sent to the console. This is the most commonly used function in GPC scripting.

Code-Snippet

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


block_all_inputs

block_all_inputs prevents any data from being sent to the console for the current iteration of the main loop.

Syntax

block_all_inputs();

Parameters

None

Returns

Nothing


ps4_authtimeout

ps4_authtimeout checks if the PS4 authentication has timed out. This is primarily used when using controllers that require periodic re-authentication on the PS4.

Syntax

ps4_authtimeout();

Parameters

None

Returns

TRUE if the authentication has timed out, FALSE otherwise.


output_reconnection

output_reconnection checks the status of the output connection to the console.

Syntax

output_reconnection();

Parameters

None

Returns

Returns the status of the reconnection process.


output_protocol

output_protocol sets the output protocol for the Cronus Zen to communicate with the console.

Syntax

output_protocol( <protocol> );

Parameters

<protocol> : The protocol constant (e.g., PROTOCOL_PS4, PROTOCOL_XB1).

Returns

Nothing


get_led

get_led returns the current state (on/off/brightness) of a specified LED on the controller.

Syntax

get_led( <led_id> );

Parameters

<led_id> : The identifier for the LED.

Returns

The current value/state of the LED.


get_rumble

get_rumble returns the current strength value of a specific rumble motor as sent by the console.

Syntax

get_rumble( <rumble_id> );

Parameters

<rumble_id> : The identifier for the rumble motor (e.g., RUMBLE_A, RUMBLE_B).

Returns

The current rumble value (0 to 100).

Last updated