I need a script PLEASE
2 posts
• Page 1 of 1
I need a script PLEASE
The script should work as follows:
Every time the L2 button is being pressed and a double click on the "X" is performed, the following should happen:
L2 remains pressed and the "R1" button is pressed and released every 20ms
To deactivate: A new click on the X ends the combo.
Every time the L2 button is being pressed and a double click on the "X" is performed, the following should happen:
L2 remains pressed and the "R1" button is pressed and released every 20ms
To deactivate: A new click on the X ends the combo.
-
ARPANET - Private
- Posts: 1
- Joined: Fri May 29, 2020 8:08 am
Re: I need a script PLEASE
Your script.
- Code: Select all
int cross_rtime;
int toggle;
main {
if(toggle) {
// To deactivate: A new click on the X ends the combo.
if(event_press(PS4_CROSS)) {
combo_stop(TurboR1);
toggle = FALSE;
} else {
// L2 remains pressed
set_val(PS4_L2, 100);
// and the "R1" button is pressed and released every 20ms
combo_run(TurboR1);
}
} else
// Every time the L2 button is being pressed
if(get_val(PS4_L2)) {
// and a double click on the "X" is performed
if(event_press(PS4_CROSS) && cross_rtime < 150) {
toggle = TRUE;
} else if(event_release(PS4_CROSS)) {
cross_rtime = 0;
} else if(cross_rtime < 200) {
cross_rtime = cross_rtime + get_rtime();
}
}
}
combo TurboR1 {
set_val(PS4_R1, 100);
wait(20);
set_val(PS4_R1, 0);
wait(10);
set_val(PS4_R1, 0);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
2 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 109 guests