[Request] Easy Script

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

[Request] Easy Script

Postby FireFly » Mon Mar 19, 2018 7:32 am

Hey guys, My Titan 2 is on its way. After being out of stock on Amazon for what seems like forever.. It finally went back in stock and I bought it instantly. It should be here this week.

Was wondering if someone could toss me a very small/easy script together. [Xbox One]

Just need an activation button, doesn't really matter what.
(Right Trigger + Up on DPAD) - To Turn On
(Left Trigger + Up on DPAD) - To Turn Off

Hit the Y Button every 7 seconds
Hit the X Button every 15 seconds

Should be pretty easy and take like 5 minutes to toss together. Chances are I could even do it myself but I don't want to take any chances and work on my project as soon as the device comes in.

I would need an advanced feature as well if even possible so I'm not going to include it in the request right now but would love to talk to an advanced coder about it :)

Thank You guys in advance!
User avatar
FireFly
Private First Class
Private First Class
 
Posts: 2
Joined: Mon Mar 19, 2018 7:22 am

Re: [Request] Easy Script

Postby J2Kbr » Mon Mar 19, 2018 10:54 am

Welcome to our forums and thank you for purchasing the Titan Two. :smile0517:
Code: Select all
bool toggle;
 
main {
    if(event_active(BUTTON_10)) {
        if(get_val(BUTTON_5)) toggle = TRUE;
        else if(get_val(BUTTON_8)) toggle = TRUE;
    }
    if(toggle) {
        combo_run(Yevery7sec);
        combo_run(Xevery15sec);
    }
}
 
combo Yevery7sec {
    set_val(BUTTON_14, 100.0);
    wait(100);
    wait(7000);
}
 
combo Xevery15sec {
    wait(5000);
    set_val(BUTTON_17, 100.0);
    wait(100);
    wait(10000);
}
 
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: [Request] Easy Script

Postby Buffy » Mon Mar 19, 2018 4:17 pm

J2Kbr wrote:Welcome to our forums and thank you for purchasing the Titan Two. :smile0517:
Code: Select all
bool toggle;
 
main {
    if(event_active(BUTTON_10)) {
        if(get_val(BUTTON_5)) toggle = TRUE;
        else if(get_val(BUTTON_8)) toggle = TRUE;
    }
    if(toggle) {
        combo_run(Yevery7sec);
        combo_run(Xevery15sec);
    }
}
 
combo Yevery7sec {
    set_val(BUTTON_14, 100.0);
    wait(100);
    wait(7000);
}
 
combo Xevery15sec {
    wait(5000);
    set_val(BUTTON_17, 100.0);
    wait(100);
    wait(10000);
}
 

You forgot to set one of the toggles to false :P
ConsoleTuner Support Team || Discord || Custom Scripts
User avatar
Buffy
Lieutenant
Lieutenant
 
Posts: 422
Joined: Wed Jul 20, 2016 5:23 am

Re: [Request] Easy Script

Postby J2Kbr » Tue Mar 20, 2018 1:21 pm

true, sorry for that, fixed:
Code: Select all
bool toggle;
 
main {
    if(event_active(BUTTON_10)) {
        if(get_val(BUTTON_5)) toggle = TRUE;
        else if(get_val(BUTTON_8)) toggle = FALSE;
    }
    if(toggle) {
        combo_run(Yevery7sec);
        combo_run(Xevery15sec);
    }
}
 
combo Yevery7sec {
    set_val(BUTTON_14, 100.0);
    wait(100);
    wait(7000);
}
 
combo Xevery15sec {
    wait(5000);
    set_val(BUTTON_17, 100.0);
    wait(100);
    wait(10000);
}
 
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: [Request] Easy Script

Postby FireFly » Thu Mar 22, 2018 11:34 pm

Thanks Very Very Much. The Titan 2 came in the mail today.. I loaded the script and it works perfect.

Minus the complete fact that I'm a moron and instead of X every 15 seconds.. I meant A every 15 seconds.. I should be able to edit the script myself by just replacing the button but if I run into problems Ill hit you guys back up.

Fantastic job and fantastic device. This should make my project 100% times easier ;)
User avatar
FireFly
Private First Class
Private First Class
 
Posts: 2
Joined: Mon Mar 19, 2018 7:22 am

Re: [Request] Easy Script

Postby J2Kbr » Fri Mar 23, 2018 12:14 pm

Thank you for your message and feedback! :)
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 GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 80 guests