building my own script

Titan Two general support. Questions, firmware update, feature request.

building my own script

Postby jop » Thu Jan 31, 2019 10:11 am

i know nothing about coding or really computers in general, so i have only used the visual scripting so far. i was wondering if there was any to set a sequence of buttons on a continuous loop using visual scripting, if there isnt can somebody send the code to make it loop.
User avatar
jop
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 31, 2019 9:57 am

Re: building my own script

Postby alanmcgregor » Thu Jan 31, 2019 7:02 pm

Learn C, is going to worth it I promise you.

I learned yeeears ago, on high school.

This tutorial is pretty basic and very easy to understand.

https://www.w3schools.in/c-tutorial/
User avatar
alanmcgregor
Major
Major
 
Posts: 988
Joined: Tue Mar 27, 2018 8:38 am

Re: building my own script

Postby jop » Fri Feb 01, 2019 1:13 pm

ill try to learn but i get the feeling that it will take quite a while to learn C, and i kinda want to get this set up as quickly as possible.

PS: sorry if i sound like a bit of CB
User avatar
jop
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 31, 2019 9:57 am

Re: building my own script

Postby Scachi » Fri Feb 01, 2019 1:34 pm

You can take a look at https://www.consoletuner.com/wiki/index ... _scripting
That documentation linked is for the Titan Two.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: building my own script

Postby jop » Sat Feb 02, 2019 2:36 am

Im really sorry but im not really interested in learning C. When i made this post i was expecting that i would either get no replies or that any replies i got would just contain the script that i could copy and paste.

im very sorry if i come across as rude or as a choosingbeggar, but i am just not interested in learning the code laungauge
User avatar
jop
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 31, 2019 9:57 am

Re: building my own script

Postby J2Kbr » Sat Feb 02, 2019 10:27 am

You can still use the Visual Script from Gtuner Pro to program the Titan Two.

In the Visual Scripting interface, click on the toolbar icon “Visual to GPC”, this command will generate the equivalent GPC code for the visual blocks, example:

Code: Select all
//
// Tue Nov 17 2018 06:22:55
// Script generated by Visual to GPC
//----------------------------------------
 
main {
    if((get_val(PS4_R2)) && (get_val(PS4_L2))) {
        combo_run(Turbo_1);
    }
}
 
combo Turbo_1 {
    set_val(PS4_R2, 100);
    wait(40);
    set_val(PS4_R2, 0);
    wait(30);
    set_val(PS4_R2, 0);
}

All you need to do is copy and paste the code on Gtuner IV and add #include <titanone.gph> at the very beginning, example:

Code: Select all
#include <titanone.gph>
 
//
// Tue Nov 17 2018 06:22:55
// Script generated by Visual to GPC
//----------------------------------------
 
main {
    if((get_val(PS4_R2)) && (get_val(PS4_L2))) {
        combo_run(Turbo_1);
    }
}
 
combo Turbo_1 {
    set_val(PS4_R2, 100);
    wait(40);
    set_val(PS4_R2, 0);
    wait(30);
    set_val(PS4_R2, 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: building my own script

Postby jop » Mon Feb 04, 2019 8:33 am

thank you, that would be very helpful but unfortunately i think when i explained my request i wasnt detailed enough (which is completely my fault and im sorry) and you misunderstood my situation (again, my fault) heres a little more detail.

-i own a titan one not a titan two
-i am on xbox
-i have downloaded gtuner pro but cannot download gtuner4
-any instructions you give me will probably have to be very detailed and step by step, due to my complete lack of experience (sorry)
-i would like someone to create a script that endlessly repeats these buttons DOWN, DOWN, (hold for 5 seconds) RT , A

once again im sorry its not you fault, and you would have been very helpful had you been more informed.
User avatar
jop
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 31, 2019 9:57 am

Re: building my own script

Postby J2Kbr » Mon Feb 04, 2019 12:54 pm

For the Titan One you can use the Visual Script Interface directly. On Gtuner Pro go to Visual Scripting panel. More details on how this interface works can be found here:

https://www.consoletuner.com/kbase/visual_scripting.htm

jop wrote:-i would like someone to create a script that endlessly repeats these buttons DOWN, DOWN, (hold for 5 seconds) RT , A

Press DOWN to Start/Stop the combo.
Code: Select all
int toggle;
 
main {
    if(event_press(XB1_DOWN)) {
        toggle = !toggle;
    }
    if(toggle) {
        combo_run(MyCombo);
    } else {
        combo_stop(MyCombo);
    }
}
 
combo MyCombo {
    set_val(XB1_DOWN, 100);
    wait(100);
    set_val(XB1_DOWN, 0);
    wait(100);
 
    set_val(XB1_DOWN, 100);
    wait(4000);
    set_val(XB1_DOWN, 100);
    wait(1000);
    set_val(XB1_DOWN, 0);
    wait(100);
 
    set_val(XB1_RT, 100);
    wait(100);
    set_val(XB1_RT, 0);
    wait(100);
 
    set_val(XB1_A, 100);
    wait(100);
    set_val(XB1_A, 0);
    wait(100);
}
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: building my own script

Postby jop » Thu Feb 07, 2019 1:16 pm

do you think you could change it to RT, RIGHT, A. i tried it and noticed a few bugs.

if anyones wondering what the script is for, im using it as a renown farm in the game rainbow six siege
User avatar
jop
Corporal
Corporal
 
Posts: 5
Joined: Thu Jan 31, 2019 9:57 am

Re: building my own script

Postby J2Kbr » Sat Feb 09, 2019 10:47 am

Changed to RT, RIGHT, A
Code: Select all
int toggle;
 
main {
    if(event_press(XB1_DOWN)) {
        toggle = !toggle;
    }
    set_val(XB1_DOWN, 0);
    if(toggle) {
        combo_run(MyCombo);
    } else {
        combo_stop(MyCombo);
    }
}
 
combo MyCombo {
    set_val(XB1_RT, 100);
    wait(100);
    set_val(XB1_RT, 0);
    wait(100);
 
    set_val(XB1_RIGHT, 100);
    wait(100);
    set_val(XB1_RIGHT, 0);
    wait(100);
 
    set_val(XB1_A, 100);
    wait(100);
    set_val(XB1_A, 0);
    wait(100);
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 126 guests