Combo Help

GPC2 script programming for Titan Two. Code examples, questions, requests.

Combo Help

Postby Chapstick » Thu Jul 02, 2020 11:30 pm

Hey, I'm looking for a combo that starts when L2 is pressed. The combo would be L2 held while R3 diagonal down right, R3 diagonal down left, R3 diagonal down right, R3 diagonal down left, etc.
User avatar
Chapstick
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Sat Jun 13, 2020 1:12 am

Re: Combo Help

Postby Chapstick » Fri Jul 03, 2020 6:11 pm

This keeps outputting 22 errors. I'm not sure how to fix it.

Code: Select all
#include <titanone.gph>
 
main {
 
    count += 1;
    if(count == 5) count = 1;
 
    if(event_press(PS4_L3)) {
        if(count == 1) combo_run(LM);
        if(count == 2) combo_run(LM);
        if(count == 3) combo_run(LM);
        if(count == 4) combo_run(LM);
    }
 
    if(event_press(PS4_R3)) {
        if(count == 1) combo_run(RM);
        if(count == 2) combo_run(maxcmb);
        if(count == 3) combo_run(maxcmb);
        if(count == 4) combo_run(RM);
    }
}
combo maxcmb {
    set_val(PS4_LX, 23);
    wait(40);
    set_val(PS4_RX, 36);
    set_val(PS4_RY, 28);
    set_val(PS4_LX, 23);
    wait(10);
    set_val(PS4_RX, 78);
    set_val(PS4_RY, 34);
    set_val(PS4_LX, 23);
    wait(10);
    set_val(PS4_RX, 81);
    set_val(PS4_RY, 59);
    set_val(PS4_LX, 23);
    wait(10);
    set_val(PS4_RX, 83);
    set_val(PS4_RY, 59);
    set_val(PS4_LX, 23);
    wait(10);
    set_val(PS4_RX, 85);
    set_val(PS4_RY, 59);
    set_val(PS4_LX, 23);
    wait(10);
    set_val(PS4_RX, 88);
    set_val(PS4_RY, 59);
    set_val(PS4_LX, 23);
    wait(30);
    set_val(PS4_RX, 87);
    set_val(PS4_RY, 58);
    set_val(PS4_LX, 23);
    wait(10);
    set_val(PS4_RX, 0);
    set_val(PS4_RY, 0);
    set_val(PS4_LX, 23);
    wait(140);
    set_val(PS4_LX, 23);
    wait(300);
}
 
 
 
 
combo LM {   set_val(PS4_R2, 100);
    set_val(PS4_RX, 100);
    set_val(PS4_RY, 0);
    wait(160);
    set_val(PS4_R2, 100);
    set_val(PS4_RX, 0);
    set_val(PS4_RY, 0);
    wait(110);
    set_val(PS4_R2, 100);
    set_val(PS4_LX, 100);
    set_val(PS4_LY, -85);
    wait(250);
}
 
 
 
combo RM {   set_val(PS4_R2, 100);
    set_val(PS4_RX, -100);
    set_val(PS4_RY, 0);
    wait(160);
    set_val(PS4_R2, 100);
    set_val(PS4_RX, 0);
    set_val(PS4_RY, 0);
    wait(110);
    set_val(PS4_R2, 100);
    set_val(PS4_LX, -100);
    set_val(PS4_LY, -85);
    wait(250);
}
User avatar
Chapstick
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Sat Jun 13, 2020 1:12 am

Re: Combo Help

Postby DontAtMe » Fri Jul 03, 2020 7:20 pm

You did not declare count.

Add this at the top of the script
Code: Select all
int count;
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: Combo Help

Postby Chapstick » Fri Jul 03, 2020 9:14 pm

DontAtMe wrote:You did not declare count.

Add this at the top of the script
Code: Select all
int count;

Thank you. I just installed the script onto Titan Two but it flashes A, U and doesn't register the controller. I tried using different slots but it didn't work. Other scripts seem to work fine.
User avatar
Chapstick
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Sat Jun 13, 2020 1:12 am

Re: Combo Help

Postby DontAtMe » Fri Jul 03, 2020 10:00 pm

Chapstick wrote:Thank you. I just installed the script onto Titan Two but it flashes A, U and doesn't register the controller..
- AU: Console authentication, connect the correspondent official controller to any available INPUT port.
https://www.consoletuner.com/wiki/index.php?id=t2

https://www.consoletuner.com/wiki/index ... connection
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: Google [Bot] and 48 guests