COMBO

GPC1 script programming for Titan One. Code examples, questions, requests.

COMBO

Postby AiM-_LoCckv1 » Mon Jun 28, 2021 10:36 am

Anyone help me with this script? I need that when I hit l2-r2 and then release only r2, my combo starts. If this works instead, I only press r2 and then when I release the combo starts, it gives me problems in the game, so it must work by pressing l2-r2 and when r2 is released the combo must start
Sorry for the turn of phrase but I can't explain better
User avatar
AiM-_LoCckv1
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Tue Mar 16, 2021 9:58 am

Re: COMBO

Postby Mad » Mon Jun 28, 2021 10:46 am

Code: Select all
main {
    if(get_val(PS4_L2) && event_release(PS4_R2)) {
        combo_run(myCombo);
    }
}
combo myCombo { }
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: COMBO

Postby AiM-_LoCckv1 » Mon Jun 28, 2021 2:06 pm

It works but only by holding l2. I would like the combo to work if I hit l2, and when r2 is released it must activate. In the script you made me, if I release r2 nothing happens but I have to keep pressed also l2 and at the release of r2 (always holding down l2) my combo is activated. If I only release R2 (without crushing l2) my combo doesn't have to work. Basically he has to do this: I hit L2 then I hit R2 and when R2 releases my combo starts.
User avatar
AiM-_LoCckv1
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Tue Mar 16, 2021 9:58 am

Re: COMBO

Postby AiM-_LoCckv1 » Tue Jun 29, 2021 3:55 pm

Mad you can help me?
User avatar
AiM-_LoCckv1
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Tue Mar 16, 2021 9:58 am

Re: COMBO

Postby Mad » Tue Jun 29, 2021 9:38 pm

Code: Select all
int x;
int timer;
main {
    if(event_release(PS4_L2)) x = TRUE;
 
    if(x) {
        timer = timer + get_rtime();
 
        if(timer > 500) {
            timer = 0;
            x = FALSE;
        }
    }
 
    if(event_release(PS4_R2) && x == TRUE) {
        timer = 0;
        x = FALSE;
        combo_run(myCombo);
    }
}
combo myCombo { }
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 122 guests