Help with a timed macro/script

GPC1 script programming for Titan One. Code examples, questions, requests.

Help with a timed macro/script

Postby Blackmamba » Sat Oct 05, 2019 11:00 am

Any help would be greatly appreciated- I’ve been trying to make a script for a timed series of button hits. Something like, when x is selected hit, A (wait a second), hit A (wait 35 seconds), hit start, left bumper, a, a, a, a, a, a, a, a, a, b, down, down, down, a, left, a} then have it loop.

I’ve been messing with the visual scripting to try the if event, but I keep getting line errors that I’m not understanding.

Thanks in advance!
User avatar
Blackmamba
Private First Class
Private First Class
 
Posts: 3
Joined: Sat Oct 05, 2019 10:53 am

Re: Help with a timed macro/script

Postby Mad » Sun Oct 06, 2019 12:47 am

You would use a macro recorder for this: https://www.consoletuner.com/kbase/plug ... s=AQAAIA==
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Help with a timed macro/script

Postby Blackmamba » Sun Oct 06, 2019 3:33 am

I’ve been trying that; but I can’t seem to find a way to get it to load to the titan one. Any suggestions on how to do that?? Thanks!
User avatar
Blackmamba
Private First Class
Private First Class
 
Posts: 3
Joined: Sat Oct 05, 2019 10:53 am

Re: Help with a timed macro/script

Postby J2Kbr » Sun Oct 13, 2019 5:41 pm

This script will execute the described sequence
Code: Select all
int toggle;
 
main {
    if(event_press(XB1_X)) {
        toggle = !toggle;
    }
    if(toggle) {
        combo_run(MyCombo);
    }
}
 
combo MyCombo {
    // hit A
    set_val(XB1_A, 100);
    // (wait a second)
    wait(1000);
    // hit A
    set_val(XB1_A, 100);
    // (wait 35 seconds)
    wait(4000); wait(4000);
    wait(4000); wait(4000);
    wait(4000); wait(4000);
    wait(4000); wait(4000);
    wait(3000);
    // hit start
    set_val(XB1_MENU, 100);
    wait(50); wait(50);
    // left bumper
    set_val(XB1_LB, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // b
    set_val(XB1_B, 100);
    wait(50); wait(50);
    // down
    set_val(XB1_DOWN, 100);
    wait(50); wait(50);
    // down
    set_val(XB1_DOWN, 100);
    wait(50); wait(50);
    // down
    set_val(XB1_DOWN, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
    // left
    set_val(XB1_LEFT, 100);
    wait(50); wait(50);
    // a
    set_val(XB1_A, 100);
    wait(50); wait(50);
}
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 GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 28 guests