Converting Script to Titan One

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

Re: Converting Script to Titan One

Postby vivekg » Sun Mar 17, 2019 7:16 pm

Hey, good news. It works! However, physically the remap isn't an improvement for my abilities as initially imagined.

Your above script - I edited it to a better configuration. Could you please check if the script has any errors or conflicts?

Code: Select all
remap PS4_OPTIONS   -> PS4_RIGHT; 
remap PS4_RIGHT  -> PS4_OPTIONS;   // (Main Menu)
remap PS4_R2     -> PS4_L1;        // (Fire)
remap PS4_L1     -> PS4_R2;        // (Weapon Wheel)
remap PS4_L2     -> PS4_R1;        // (Aim/ADS)
remap PS4_R1     -> PS4_L2;        // (Power Wheel)
 
//\\/\\/\\// NEW NEW NEW //\\/\\/\\//
 
remap PS4_SQUARE -> PS4_DOWN;      // (Reload/Swap)
remap PS4_DOWN -> PS4_CIRCLE;
remap PS4_CIRCLE -> PS4_TRIANGLE;   // (Melee)
remap PS4_TRIANGLE -> PS3_SQUARE;   // (Main Power)
 
\\//\\/\\/\\ NEW NEW NEW \\//\\/\\/\\
 
int powers_toggle = FALSE;
int ads_toggle = FALSE;
 
main {
    // Touchpad Press = XB1_XBOX -> PS4_PS
 
if (get_console() != PIO_PS4 && get_controller() == PIO_PS4) {         
    if (get_val(PS4_TOUCH) && get_val(27)) {                       
        set_val(0, 100);                                               
                }
 
    } if(event_press(PS4_L2)) {
        powers_toggle = !powers_toggle;
    }
    if(powers_toggle) {
        set_val(PS4_L2, 100);
    } else {
        set_val(PS4_L2, 0);
    }
 
    if(event_press(PS4_R1)) {
        ads_toggle = !ads_toggle;
    }
    if(ads_toggle) {
        set_val(PS4_R1, 100);
    } else {
        set_val(PS4_R1, 0);
    }
}
User avatar
vivekg
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Sun Feb 17, 2019 6:32 pm

Re: Converting Script to Titan One

Postby J2Kbr » Sun Mar 17, 2019 11:05 pm

Your remapping is perfect, you definitively understood how to use this function.

The idea is start and end with the same button, like you did:

|Options -> Right | Right -> Options|

|R2 -> L1 | L1 -> R2|

|L2 -> R1 | R1 -> L2|

|Square -> Down | Down -> Circle | Circle -> Triangle | Triangle -> Square|
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: Converting Script to Titan One

Postby vivekg » Mon Mar 18, 2019 2:29 pm

Thank you, as a beginner your support has been valuable.

I can write the touchpad swipe commands myself. But once I've written the script could I run them past you?

One Q: How do you add script to an existing "main" section of a script? I managed it a few times by that was due to dumb brute-force method.
User avatar
vivekg
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Sun Feb 17, 2019 6:32 pm

Re: Converting Script to Titan One

Postby J2Kbr » Mon Mar 18, 2019 7:01 pm

Definitively :smile0517: if needed you can PM me or contact me via email.

vivekg wrote:One Q: How do you add script to an existing "main" section of a script? I managed it a few times by that was due to dumb brute-force method.

With the Titan One scripting language you can have only a single init{} and main{} sections. So to combine two scripts, copy the contents of the section (without main { and the final } ) and paste inside of the section on the other script.
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: Converting Script to Titan One

Postby vivekg » Mon Mar 18, 2019 7:27 pm

Good idea, What's your email ?
User avatar
vivekg
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Sun Feb 17, 2019 6:32 pm

Re: Converting Script to Titan One

Postby J2Kbr » Mon Mar 18, 2019 8:09 pm

Please make your first email contact using this page:

https://www.consoletuner.com/contact-us/

Due spam bots is better not post the plain text email address on the internet.

Thanks.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Previous

Return to Gtuner Pro Support

Who is online

Users browsing this forum: No registered users and 21 guests