Help please with script
6 posts
• Page 1 of 1
Help please with script
I just received my Titan Two and Im trying to get my first script together. I found this on one of the forums but when I do the test and debug active work it gives a lot of errors.
Can someone help? Its supposed to do as the instructions say in the initial portion.
thank you
Can someone help? Its supposed to do as the instructions say in the initial portion.
thank you
- Code: Select all
/*
when u press "L1", it will perform R2 first and then "L1"
when u press "L2", it will perform R2 first and then "L2"
toggle hold L2 and press R3
*/
int BTN;
int OnOff;
main {//---------------------------------------------
// Toggle On / Off hold L2 and press R3
if(get_val(PS4_L2) && event_press(PS4_R3)){
OnOff=!OnOff;
}
if(OnOff){//----------------------------------------------------------------------------------
if(get_val(PS4_L1)) {BTN=PS4_L1; set_val(PS4_L1, 0);combo_run(LIGHT_ATTACK);}
if(get_val(PS4_L2)) {BTN=PS4_L2; set_val(PS4_L2, 0);combo_run(LIGHT_ATTACK);}
}//-------------------------------------------------------------------------------------------
}//--------------------------------------------------
combo LIGHT_ATTACK {
set_val(4,100);
wait(50);
set_val(BTN,100);
wait(50);
}
-
Ozzycpd - Sergeant First Class
- Posts: 23
- Joined: Fri Aug 11, 2017 1:09 pm
Re: Help please with script
I'm on the road at this moment but this is Titan one script code so it won't work without a header from the T1.
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Help please with script
Thank you for the reply, ill patiently wait till you or someone has time to look it over as I have no idea what im doing....
-
Ozzycpd - Sergeant First Class
- Posts: 23
- Joined: Fri Aug 11, 2017 1:09 pm
Re: Help please with script
Here is your script working:
- Code: Select all
#include <titanone.gph>
/*
when u press "L1", it will perform R2 first and then "L1"
when u press "L2", it will perform R2 first and then "L2"
toggle hold L2 and press R3
*/
int BTN;
int OnOff;
main {//---------------------------------------------
// Toggle On / Off hold L2 and press R3
if(get_val(PS4_L2) && event_press(PS4_R3)){
OnOff=!OnOff;
}
if(OnOff){//----------------------------------------------------------------------------------
if(get_val(PS4_L1)) {BTN=PS4_L1; set_val(PS4_L1, 0);combo_run(LIGHT_ATTACK);}
if(get_val(PS4_L2)) {BTN=PS4_L2; set_val(PS4_L2, 0);combo_run(LIGHT_ATTACK);}
}//-------------------------------------------------------------------------------------------
}//--------------------------------------------------
combo LIGHT_ATTACK {
set_val(4,100);
wait(50);
set_val(BTN,100);
wait(50);
}
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Help please with script
thank you very much!
-
Ozzycpd - Sergeant First Class
- Posts: 23
- Joined: Fri Aug 11, 2017 1:09 pm
6 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 42 guests