Help on script, confused??

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

Help on script, confused??

Postby Ctuna2000 » Sat Mar 27, 2021 6:21 pm

So, for this script here. It seems that the 7 minute combo run time, then doing the "tap X" is timing wrong? Like, after leaving it run a few times, the times slowly start changing? Is it because of the wait lines in the script for the button presses?

Code: Select all
int SMASH = FALSE; 
int msecs, secs, mins, hours, days;
 
main {
    msecs = msecs + get_rtime();
    if(msecs >= 1000) {
        msecs = msecs - 1000;
        secs = secs + 1;
        if(secs >= 60) {
            secs = secs - 60;
            mins = mins + 1;
            if(mins >= 60) {
                mins = mins - 60;
                hours = hours + 1;
                if(hours >= 24) {
                    hours = hours - 24;
                    days = days + 1;
                }
            }
        }
    }
 
    if(event_press(XB1_DOWN)) {
        SMASH = !SMASH;
        msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
    }
 
    if (SMASH && !combo_running(SMASH_Y)) {
        if (mins < 7) combo_run(SMASH_X);
        else {
        combo_run(SMASH_Y);
        msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
        }
    }
    if (SMASH) {
        if ( secs > 8 && combo_running(SMASH_Y)) {
        combo_stop(SMASH_Y);
        combo_run(SMASH_X);
        msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
    }
     }
}
 
 
combo SMASH_X {
set_val(XB1_RT,100);
set_val(XB1_A, 100);
wait(110);
set_val(XB1_RT,100);
set_val(XB1_A, 0);
wait(110);
set_val(XB1_RT,100);
}
 
combo SMASH_Y {
set_val(XB1_RT, 0);
set_val(XB1_A, 0);
wait(4000);
wait(4000);
set_val(XB1_X,100)
wait(110);
wait(40);
 
 
}
User avatar
Ctuna2000
Sergeant Major
Sergeant Major
 
Posts: 84
Joined: Tue Mar 09, 2021 10:09 pm

Re: Help on script, confused??

Postby Ctuna2000 » Sat Mar 27, 2021 6:45 pm

If possible, can someone make the 7 minutes reset/stop counting time when the 8 seconds is counting? Then start the 7 minutes from fresh after the 8 seconds are done? Would that fix my problem?
User avatar
Ctuna2000
Sergeant Major
Sergeant Major
 
Posts: 84
Joined: Tue Mar 09, 2021 10:09 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 37 guests