A Simple Tutorial
Last updated
Was this helpful?
Last updated
Was this helpful?
Load Zen Studio and click File > New > Empty File
Copy and paste the following code into the GPC code editor within Zen Studio.
Compile the code to check for errors. To do this, either press F7 on your keyboard or go to the Compiler drop-down menu in Zen Studio and select compile:
The Output window below the GPC editor should give you this message;
If your Cronus Zen is connected via the PROG USB port and you have a controller connected, you can see this script in action by using the Build and Run option. This is accessed by either pressing F5 or selecting Build and Run in the Compiler drop-down menu. This function will compile the code and then send it to your Cronus Zen so you can test it.
What this script does is run the combo named RAPID_FIRE whenever the right trigger has a value or is pressed. If the Right Trigger is still held when the combo ends, it will be run again. To analyse how the Cronus Zen is told how to do this we must first break the script down into its two sections, the main and combo sections.
Now that you understand how this script works, we will make it more complex and change when the combo is run.
Look at this line in the main section:
and change it to:
By introducing && !get_val(XB1_LT)
in to the if statement we are telling the Cronus Zen to only run the combo if the Right Trigger has a value and the Left Trigger does not. &&
means 'and' in GPC and !
means not. So the if statement now reads 'if Right Trigger has a value and Left Trigger does not'. Which means when using this code in game the Cronus Zen will only Rapid Fire your gun when you are not aiming down the sights. You can use the build and run function to see this code in action.