Simple Double Click Example Script

Simple Double Click Example Script
Version1
AuthorUK_Wildcats
Publish DateTue, 5 Apr 2016 - 17:26
Last UpdateTue, 5 Apr 2016 - 17:26
Downloads24
RATE


1

0

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);
}