Help please with script

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

Help please with script

Postby Ozzycpd » Mon Aug 21, 2017 7:05 pm

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

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);
 
 
}
User avatar
Ozzycpd
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Fri Aug 11, 2017 1:09 pm

Re: Help please with script

Postby bonefisher » Mon Aug 21, 2017 7:36 pm

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
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Help please with script

Postby Ozzycpd » Mon Aug 21, 2017 7:37 pm

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.... :shocked:
User avatar
Ozzycpd
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Fri Aug 11, 2017 1:09 pm

Re: Help please with script

Postby Prototype » Mon Aug 21, 2017 7:50 pm

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! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3252
Joined: Sun Dec 16, 2012 1:43 pm

Re: Help please with script

Postby Ozzycpd » Mon Aug 21, 2017 7:59 pm

thank you very much!
User avatar
Ozzycpd
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Fri Aug 11, 2017 1:09 pm

Re: Help please with script

Postby bonefisher » Mon Aug 21, 2017 8:12 pm

:smile0517:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 42 guests