a basic script i can't make it to work

Gtuner Pro general support. Operation, questions, updates, feature request.

a basic script i can't make it to work

Postby sporat2012 » Sun Dec 22, 2019 10:34 am

hi, i can't figure out how to make this code, all i want it to do when i press left on D-pad (PS4):

    hold triangle for 1 second
    press R1 once
    wait two seconds
    press triangle once
    repeat



here's my failed attempt:

Code: Select all
#pragma METAINFO("Destiny 2 melee", 1, 0, " ")
#include <titanone.gph>
 
int onoff;
 
main
{
if(event_press(PS4_LEFT))
{onoff = !onoff;}
if(onoff){combo_run(melee);
}
}
 
combo melee
{
set_val(PS4_TRIANGLE, 100);
wait(1000);
set_val(PS4_R1, 100);
wait(1000);
set_val(PS4_TRIANGLE, 0);
wait(1000);
set_val(PS4_R1, 0);
wait(1000);
}
sporat2012
Corporal
Corporal
 
Posts: 4
Joined: Fri May 10, 2019 6:04 am

Re: a basic script i can't make it to work

Postby Mad » Sun Dec 22, 2019 11:24 am

Are you trying to compile this for the titan one?

Remove this:
Code: Select all
#pragma METAINFO("Destiny 2 melee", 1, 0, " ")
#include <titanone.gph>
ConsoleTuner Support Team || Discord
Mad
Major
Major
 
Posts: 914
Joined: Wed May 22, 2019 5:39 am

Re: a basic script i can't make it to work

Postby sporat2012 » Sun Dec 22, 2019 11:25 am

i'm not sure what that is but i was trying to modify an existing code i have, i have titan two though
sporat2012
Corporal
Corporal
 
Posts: 4
Joined: Fri May 10, 2019 6:04 am

Re: a basic script i can't make it to work

Postby Mad » Sun Dec 22, 2019 11:41 am

Try this:
Code: Select all
#pragma METAINFO("Destiny 2 melee", 1, 0, " ")
 
#include <ps4.gph>
 
bool onoff;
 
main {
    if(event_active(PS4_LEFT)) { onoff = !onoff; }
    if(onoff) { combo_run(melee); }
}
 
combo melee {
    set_val(PS4_TRIANGLE, 100); // hold triangle for 1 second
    wait(1000);
    set_val(PS4_R1, 100); // press R1
    wait(60);
    wait(2000); // wait two seconds
    set_val(PS4_TRIANGLE, 100); // press triangle
    wait(60);
    set_val(PS4_TRIANGLE, 0);
    wait(0);
}
ConsoleTuner Support Team || Discord
Mad
Major
Major
 
Posts: 914
Joined: Wed May 22, 2019 5:39 am

Re: a basic script i can't make it to work

Postby sporat2012 » Sun Dec 22, 2019 8:11 pm

it didn't work the way i wanted, thanks though
sporat2012
Corporal
Corporal
 
Posts: 4
Joined: Fri May 10, 2019 6:04 am


Return to Gtuner Pro Support

Who is online

Users browsing this forum: Infuego and 13 guests