Perfect Shoot (Jose) Golf

User request script.
Version1.2
AuthorJ2Kbr
Publish DateMon, 11 Apr 2016 - 18:08
Last UpdateMon, 18 Apr 2016 - 18:26
Downloads226
RATE


2

0

Code: Select all
// GPC Online Library
// perfect_shoot_jose_golf.gpc
 
define D7_01    = 0;
define D5_11    = 1;
define D6_12    = 2;
 
define SHOT_CHARGE = 400;
 
int xA[3], xB[3], yA[3], yB[3];
 
// Update this variable to select the direction
// D7_01 or D5_11 or D6_12
int dir = D7_01;
 
init {
    xA[D7_01] = -45; yA[D7_01]100;
    xB[D7_01]45; yB[D7_01] = -100;
    xA[D5_11]45; yA[D5_11]100;
    xB[D5_11] = -45; yB[D5_11] = -100;
    xA[D6_12] =   0; yA[D6_12]100;
    xB[D6_12] =   0; yB[D6_12] = -100;
}
 
main {
    if(event_press(PS4_R2)) {
        combo_run(PerfectShoot);
    }
}
 
combo PerfectShoot {
    set_val(PS4_LX, 0);
    set_val(PS4_LY, 0);
    wait(50);
 
    set_val(PS4_LX, xA[dir]);
    set_val(PS4_LY, yA[dir]);
    wait(SHOT_CHARGE);
 
    set_val(PS4_LX, 0);
    set_val(PS4_LY, 0);
    wait(50);
 
    set_val(PS4_LX, xB[dir]);
    set_val(PS4_LY, yB[dir]);
    wait(100);
}