Gtuner iv often turn off

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

Gtuner iv often turn off

Postby feverage » Sat Jun 09, 2018 2:32 am

Hello.

I became a new user of Titan Two.

I am having trouble making scripts.

Dragging to the slot turns it off.
Is there any action I need to take after writing the script?

I want a very simple script. Trying to use the Xbox one controller on ps4

I want remap keys


ps4 toch pad ===> xbox1 view (inpu transfer have not 27button)
ps4 x button ===> xbox1 LB button
ps4 L1+R1 ===> xbox1 LS+RS

I think this is a very easy script. but the program goes out.

I wish I could get help. Good luck!
User avatar
feverage
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Jun 09, 2018 2:11 am

Re: Gtuner iv often turn off

Postby bonefisher » Sat Jun 09, 2018 6:40 am

Lets take a look at script please post!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Gtuner iv often turn off

Postby feverage » Sat Jun 09, 2018 3:20 pm

I will try it in a simple script.
I tried this.

Code: Select all
 
 
main
{   
 
//JUMPER   
    if(get_val(XB1_LB))
    {   
        set_val(PS4_CROSS, 100.0);
        set_val(PS4_L2, 0.0);       
 
    }
 
}
 
 


Dragging it into the slot will turn the program off.

For example, if I download the "Destiny2- Scashi" gpc from the online resources
It goes right into the slot.
But I create new gpc file. After copy & pas it, take it to the slot and the program will turn off.
I can not understand why the same script does not work.
User avatar
feverage
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Jun 09, 2018 2:11 am

Re: Gtuner iv often turn off

Postby feverage » Sat Jun 09, 2018 3:36 pm

I have scripts I used earlier in another product. (CMMAX)

The script I want is:
A little stronger trigger sensitivity
ps4 x button ===> xbox1 LB button
PS4 L1 button ====> xbox1 RS
Ps4 L1 + R1 button ====> xbox1 LB+RB
PS4 share button ====> Xbox1 veiw+RS

If you can help me with a little script, I will try to fix it.
Thank you!

Code: Select all
 
   init {
        if(get_console() == PIO_PS3) { // PS3 Trigger & Bumper
            fire_button = 3;
            scope_button = 6;
        } else {                       // Natural Trigger & Bumper
            fire_button = 4;
            scope_button = 7;
        }
    }
    //  MAIN PROCEDURE
    // ---------------------------------------------------------
    main {
 
    if(get_val(XB1_LT) > 4)
        set_val(7, 100);
 
    if(get_val(4) < 30)
        set_val(4, 0);
 
 
    if(get_val(XB1_RT) > 4)
        set_val(4, 50);
 
    if(get_val(XB1_RT) < 5)
        set_val(4, 0);
 
 
 
 
 
    // XBOX buttons remaps
    if(get_val(XB1_XBOX))
    {
        set_val(PS4_TOUCH,0);
        set_val(PS4_PS,100);
        set_val(PS4_SHARE,0);
        set_val(PS4_R3,0);
    }
 
 
 
 
 
 
 
    else if(get_val(XB1_VIEW) && get_val(XB1_RS))
    {
        set_val(PS4_SHARE,100);
        set_val(PS4_OPTIONS,0);
    }
 
 
 
 
    else if(get_val(XB1_VIEW))
    {
        set_val(PS4_TOUCH,100);
        set_val(PS4_PS,0);
        set_val(PS4_SHARE,0);
        set_val(PS4_OPTIONS,0);
    }
 
 
 
 
 
 
     else if(get_val(XB1_VIEW) && get_val(XB1_RB))
    {
        ps4_set_touchpad(-50, -45);
        set_val(PS4_TOUCH, 100);
        set_val(PS4_SHARE,0);
    }
 
 
 
    else if(get_val(XB1_VIEW) && get_val(XB1_LB))
    {
        ps4_set_touchpad(80, -45);
        set_val(PS4_TOUCH, 100);
        set_val(PS4_SHARE,0);
    }
 
 
 
    else if(get_val(XB1_LS) && get_val(XB1_RIGHT))
    {
        set_val(PS4_TOUCH,0);
        set_val(PS4_SHARE,100);
    }
 
 
 
 
 
 
 
 
 
     else if(get_val(XB1_RB) && get_ptime(XB1_RB) > 500)
     {
     set_val(PS4_L1,100);
     set_val(PS4_R1,100);
     }
 
    else if(get_val(XB1_LS) && get_val(XB1_RS))
    {
        set_val(PS4_L1,100);
        set_val(PS4_R1,100);
    }
 
    else if(get_val(XB1_LB) && get_val(XB1_RB))
    {
        set_val(PS4_L1,100);
        set_val(PS4_R1,100);
    }
 
 
    else if(get_val(XB1_PL1))
   {
        set_val(PS4_R1,100);
        set_val(PS4_L1,100);
    }
 
    else if(get_val(XB1_LT) && get_val(XB1_RB))
    {
        set_val(PS4_L1,0);
        set_val(PS4_R1,100);
    }
 
 
 
    else if(get_val(XB1_LT) && get_val(XB1_LB))
    {
        set_val(PS4_CROSS,100);
        set_val(PS4_R1,0);
        set_val(PS4_L1,0);
    }
 
 
 
 
    else if(get_val(XB1_LB))
   {
        set_val(PS4_L1,0);
        set_val(PS4_CROSS,100);
    }
 
    else if(get_val(XB1_RB))
   {
        set_val(PS4_R1,100);
        set_val(PS4_R2,100);
    }
 
 
 
    else if(get_val(XB1_RS))
    {
        set_val(PS4_TRIANGLE,0);
        set_val(PS4_L1,100);
    }
 
 
 
    else if(get_val(XB1_RT))
    {
        set_val(PS4_R2,100);
        set_val(PS4_R2,100);
    }
 
 
    else if(get_val(XB1_MENU))
    {
        set_val(PS4_TOUCH,0);
        set_val(PS4_PS,0);
        set_val(PS4_SHARE,0);
        set_val(PS4_OPTIONS,100);
    }
 
 
    else
    {
        set_val(PS4_TOUCH,0);
        set_val(PS4_PS,0);
        set_val(PS4_SHARE,0);
        set_val(PS4_OPTIONS,0);
    }
 
 
 
}
 
 
User avatar
feverage
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Jun 09, 2018 2:11 am

Re: Gtuner iv often turn off

Postby J2Kbr » Mon Jun 11, 2018 12:50 pm

Hi feverage, by "Gtuner IV turns off" you mean the software crashes and closes? if yes, does it show any error message?

The script you posted seems to be fine and possible is not the cause of this issue.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Gtuner iv often turn off

Postby feverage » Mon Jun 11, 2018 1:39 pm

When I used Windows 10, the program was turned off.

Using Windows 7, I inserted the gpc into the slot and found the error code.

Error code is here:(gpc file name 44)

Thank you for listening to my troubles.

Code: Select all
 
 
GPC: Preprocessor started.
GPC: First-pass started.
GPC: Variables: Global: 0, Local: 0, Parameters: 0, Pointers: 0, Constants: 0, Labels: 0, Functions: 0, Combos: 0
GPC: Memory usage: Static: 0 bytes (0.00%), Dynamic: 0 bytes (0.00%)
GPC: Second-pass started.
GPC error: 44.gpc(5): Identifier not declared 'XB1_LB'.
GPC error: 44.gpc(5): Illegal operation 'get_val'.
GPC error: 44.gpc(7): Identifier not declared 'PS4_CROSS'.
GPC error: 44.gpc(7): Illegal operation 'set_val'.
GPC error: 44.gpc(8): Identifier not declared 'PS4_L2'.
GPC error: 44.gpc(8): Illegal operation 'set_val'.
 
 
User avatar
feverage
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Jun 09, 2018 2:11 am

Re: Gtuner iv often turn off

Postby J2Kbr » Mon Jun 11, 2018 1:48 pm

The script seems to be for Titan One, in this case use the back compatibility header file:
Code: Select all
#include <titanone.gph>
 
int fire_button;
int scope_button;
 
init {
    if(get_console() == PIO_PS3) { // PS3 Trigger & Bumper
        fire_button = 3;
        scope_button = 6;
    } else {                       // Natural Trigger & Bumper
        fire_button = 4;
        scope_button = 7;
    }
}
//  MAIN PROCEDURE
// ---------------------------------------------------------
main {
 
if(get_val(XB1_LT) > 4)
    set_val(7, 100);
 
if(get_val(4) < 30)
    set_val(4, 0);
 
 
if(get_val(XB1_RT) > 4)
    set_val(4, 50);
 
if(get_val(XB1_RT) < 5)
    set_val(4, 0);
 
 
 
 
 
// XBOX buttons remaps
if(get_val(XB1_XBOX))
{
    set_val(PS4_TOUCH,0);
    set_val(PS4_PS,100);
    set_val(PS4_SHARE,0);
    set_val(PS4_R3,0);
}
 
 
 
 
 
 
 
else if(get_val(XB1_VIEW) && get_val(XB1_RS))
{
    set_val(PS4_SHARE,100);
    set_val(PS4_OPTIONS,0);
}
 
 
 
 
else if(get_val(XB1_VIEW))
{
    set_val(PS4_TOUCH,100);
    set_val(PS4_PS,0);
    set_val(PS4_SHARE,0);
    set_val(PS4_OPTIONS,0);
}
 
 
 
 
 
 
 else if(get_val(XB1_VIEW) && get_val(XB1_RB))
{
    ps4_set_touchpad(-50, -45);
    set_val(PS4_TOUCH, 100);
    set_val(PS4_SHARE,0);
}
 
 
 
else if(get_val(XB1_VIEW) && get_val(XB1_LB))
{
    ps4_set_touchpad(80, -45);
    set_val(PS4_TOUCH, 100);
    set_val(PS4_SHARE,0);
}
 
 
 
else if(get_val(XB1_LS) && get_val(XB1_RIGHT))
{
    set_val(PS4_TOUCH,0);
    set_val(PS4_SHARE,100);
}
 
 
 
 
 
 
 
 
 
 else if(get_val(XB1_RB) && get_ptime(XB1_RB) > 500)
 {
 set_val(PS4_L1,100);
 set_val(PS4_R1,100);
 }
 
else if(get_val(XB1_LS) && get_val(XB1_RS))
{
    set_val(PS4_L1,100);
    set_val(PS4_R1,100);
}
 
else if(get_val(XB1_LB) && get_val(XB1_RB))
{
    set_val(PS4_L1,100);
    set_val(PS4_R1,100);
}
 
 
else if(get_val(XB1_P1))
{
    set_val(PS4_R1,100);
    set_val(PS4_L1,100);
}
 
else if(get_val(XB1_LT) && get_val(XB1_RB))
{
    set_val(PS4_L1,0);
    set_val(PS4_R1,100);
}
 
 
 
else if(get_val(XB1_LT) && get_val(XB1_LB))
{
    set_val(PS4_CROSS,100);
    set_val(PS4_R1,0);
    set_val(PS4_L1,0);
}
 
 
 
 
else if(get_val(XB1_LB))
{
    set_val(PS4_L1,0);
    set_val(PS4_CROSS,100);
}
 
else if(get_val(XB1_RB))
{
    set_val(PS4_R1,100);
    set_val(PS4_R2,100);
}
 
 
 
else if(get_val(XB1_RS))
{
    set_val(PS4_TRIANGLE,0);
    set_val(PS4_L1,100);
}
 
 
 
else if(get_val(XB1_RT))
{
    set_val(PS4_R2,100);
    set_val(PS4_R2,100);
}
 
 
else if(get_val(XB1_MENU))
{
    set_val(PS4_TOUCH,0);
    set_val(PS4_PS,0);
    set_val(PS4_SHARE,0);
    set_val(PS4_OPTIONS,100);
}
 
 
else
{
    set_val(PS4_TOUCH,0);
    set_val(PS4_PS,0);
    set_val(PS4_SHARE,0);
    set_val(PS4_OPTIONS,0);
}
 
 
 
}
 
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Gtuner iv often turn off

Postby feverage » Mon Jun 11, 2018 4:27 pm

That`s Great!!

It solved my problem perfectly.

I enjoy playing games!! Thank you very very much!!

and.....Could you give me some help?

1. I want to use it when restarting the last used slot.

2. I want to change the slot number with the button on the gamecontrollers. 0~9 slots.

Is there a script that changes to the next slot every time the button is pressed?


Have a nice day!! :)
User avatar
feverage
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Jun 09, 2018 2:11 am

Re: Gtuner iv often turn off

Postby Scachi » Tue Jun 12, 2018 7:16 pm

feverage wrote:1. I want to use it when restarting the last used slot.

You have to tick the option "Recall loaded memory slot between power cycles" in the "Device Configuration" pane of GTuner IV

feverage wrote:2. I want to change the slot number with the button on the gamecontrollers. 0~9 slots.
Is there a script that changes to the next slot every time the button is pressed?

No script needed.
Hold L1/LB + press PS/Guide to load the previous slot, hold R1/RB + press PS/Guide to load the next slot and hold L1/LB + R1/RB + press PS/Guide to unload the slot.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Gtuner iv often turn off

Postby feverage » Thu Jun 21, 2018 9:05 am

Thank you very much. Everything is ready.
User avatar
feverage
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Jun 09, 2018 2:11 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 70 guests