Simple Double Click Example Script
Simple Double Click Example Script
|
RATE
|
- Code: Select all
int Timer1;
main {
// Timer - Countdown function
if (Timer1 > 0) { Timer1 = Timer1 - get_rtime(); } // Reduce the timer value by the elapsed run time
// Timer - Detection of the release
if (event_release(PS4_L2)) {
Timer1 = 300; // 300 ms timer (starting the timer)
}
// Timer - Detection of the press
if (event_press(PS4_L2) && Timer1 > 0) {
Timer1 = 0;
combo_run(Combo1);
}
}
combo Combo1 {
set_val(PS4_R1, 100);
wait(100);
set_val(PS4_R1, 0);
}