Core Console Functions
Last updated
Last updated
opcode
sets one bit of a variable based on its bit index¹ ² ³
opcode( <variable> , <bit_index> );
<variable> : any defined variable. <bit_index> : index point of the bit to be set with a range of 0 to 15.
Nothing
set_val
overwrites the current value of a controller entry with the value that is specified in its second parameter. What this means is 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, if you were playing a shooter game and wished to create Hair Triggers. A combo would not be suitable for such a function as you would want the output constant for however long the triggers are held down. You could use the set_val command within the main section to achieve that function, like so:
set_val ( <identifier> );
<identifier> : the identifier of a controller entry
block_all_input
Blocks all output from being sent to the console this cycle of main
ps4_authtimeout
returns the authentications timeout status on the PS4 in the form of an int. As with output_reconnection
, this function is redundant since Firmware 1.20 and above as Partial PS4 cross over support is no longer required. However, the function has not been removed as legacy CronusZEN users and those not using a USB Hub would still require it. The main function of ps4_authtimeout is to enable you to script a warning when the CronusZEN is close to automatically disconnecting and reconnecting to the console when the authentication times out on a PS4. This could be achieved using a script from our online library:
ps4_authtimeout ( );
None
The PS4 authentication timeout status. This is a decedent count down with 1 being the last value returned before an Automatic Reconnection is performed by the CronusZEN.
opcode
sets one bit of a variable based on its bit index¹ ² ³
opcode( <variable> , <bit_index> );
<variable> : any defined variable. <bit_index> : index point of the bit to be set with a range of 0 to 15.
Nothing
get_led
returns a value in the form of an int which represents the current state of the chosen LED. The LEDs range from 0 ~ 3. Four constants have been created to make it easier to remember which value is assigned to which LED:
The return value from this function informs you of the current state of the selected LED. The function returns a value ranging from 0 ~ 3;
Example of usage:
get_led ( <Led_Identifier> );
<Led_Identifier> : The identifier of an LED
An int ranging from 0 ~ 3 which represents the current state
Click here for more information on LED states
get_rumble returns the speed of the chosen rumble motor on the controller in the form of an int. The value returned can range from 0 ~ 100 which represents the speed in a percentage ( % ). The rumble motors are numbered 0 ~ 3. To make it easier to remember which motor is which, four constants have been created:
Example of usage:
get_rumble ( <rumble_identifier> );
<rumble_identifier> : the identifier of a Rumble Motor
An int ranging from 0 ~ 100 which represents the current speed of the chosen motor
Click here for more information on setting Rumble Motors
Function Name
Description
Zen
Plus
Gets which console is currently connected
✔️
✔️
Sets the output value to send to the console
✔️
✔️
Blocks all output from being sent to the console this cycle of main
✔️
❌
Check if ps4 authentication is timed out
❌
✔️
Check the output if reconnected
❌
✔️
output_protocol
Sets Output protocol
❌
✔️
Returns the current state of a specified LED
✔️
✔️
Returns the current value of a rumble motor
✔️
✔️
Name
Description
Value
LED_1
LED 1 / Xbox 360 Quadrant 1
0
LED_2
LED 2 / Xbox 360 Quadrant 2
1
LED_3
LED 3 / Xbox 360 Quadrant 3
2
LED_4
LED 4 / Xbox 360 Quadrant 4
3
Return Value
Description
0
LED Off
1
LED On
2
LED Blinking Fast
3
LED Blinking Slowly
Name
Description
Value
RUMBLE_A
Strong Rumble Motor (Usually the Left Motor)
0
RUMBLE_B
Weak Rumble Motor (Usually the Right Motor)
1
RUMBLE_RT
Right Trigger Motor (Xbox One controllers only)
2
RUMBLE_LT
Left Trigger Motor (Xbox One controllers only)
3