Script for jumping PS4/PS5

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

Script for jumping PS4/PS5

Postby Brishna » Wed Apr 28, 2021 5:04 pm

Hello,

is there a possibility to make a script for the automatic jump? x on the controller is for example jumping. if I press x once that it starts the script and every second jumps so x simulates. and when I press x again the script stops. Thanks for your help
User avatar
Brishna
Private First Class
Private First Class
 
Posts: 2
Joined: Wed Apr 28, 2021 4:57 pm

Re: Script for jumping PS4/PS5

Postby Mad » Wed Apr 28, 2021 10:56 pm

Code: Select all
bool x;
main {
    if(event_active(BUTTON_16)) x = !x;
    if(x) combo_run(jump);
    else if(jump) combo_stop(jump);
}
combo jump {
    wait(1000);
    set_val(BUTTON_16, 100);
    wait(60);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: Script for jumping PS4/PS5

Postby Brishna » Thu Apr 29, 2021 6:43 am

thank you
User avatar
Brishna
Private First Class
Private First Class
 
Posts: 2
Joined: Wed Apr 28, 2021 4:57 pm

Re: Script for jumping PS4/PS5

Postby Mad » Thu Apr 29, 2021 7:02 am

Brishna wrote:thank you

as requested in PM:
Code: Select all
#include <ps4.gph>
bool x;
main {
    if(event_active(PS4_CROSS)) x = !x;
    if(x) combo_run(jump);
    else if(jump) combo_stop(jump);
 
    if(event_active(PS4_R3)) combo_run(zzz);
}
combo jump {
    wait(1000);
    set_val(PS4_CROSS, 100);
    wait(60);
}
combo zzz {
    set_val(PS4_R2, 100);
    wait(60);
    set_val(PS4_CIRCLE, 100);
    wait(60);
    set_val(PS4_TRIANGLE, 100);
    wait(60);
    set_val(PS4_R1, 100);
    wait(60);
    set_val(PS4_L1, 100);
    wait(60);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: Majestic-12 [Bot] and 86 guests