PDA

View Full Version : Someone please make this code smaller?



b2aSH
10th May 15, 16:36
I want this to fit in one device. This is use on a stick so... yea. Thank you.
Also can you explain how you made it smaller? So I can do so myself. Thank you. :)



// Remap of end buttons
remap XB1_LT -> XB1_RS;
remap XB1_RS -> XB1_LT;
remap XB1_RB -> XB1_LS;
remap XB1_LS -> XB1_RB;


main {


// X,X Left side
if( get_lval (XB1_RB) ){
combo_run (jableft)
}


// X,X Right side
if( get_lval (XB1_LT) ){
combo_run (jabright)
}


// fwd X, X Left side
if( get_val(XB1_RIGHT) && get_lval (XB1_X) ){
combo_run (fwdjableft)
}


// fwd X, X Right side
if( get_val(XB1_LEFT) && get_lval (XB1_X) ){
combo_run (fwdjabright)
}


// fwd y, y Left side
if( get_val(XB1_RIGHT) && get_lval (XB1_LB) ){
combo_run (fwdyleft)
}


// fwd y, y Right side
if( get_val(XB1_LEFT)&& get_lval (XB1_LB) ){
combo_run (fwdyright)
}


// Back X Left side
if( get_val(XB1_LEFT) && get_lval (XB1_B) ){
combo_run (Bjableft)
}


// Back X Right side
if( get_val(XB1_RIGHT) && get_lval (XB1_B) ){
combo_run (Bjabright)
}


// cancel
if (get_val(XB1_Y)) {
combo_stop (jabright)
combo_stop (jableft)
combo_stop (fwdjabright)
combo_stop (fwdjableft)
combo_stop (fwdyright)
combo_stop (fwdyleft)
combo_stop (Bjabright)
combo_stop (Bjableft)
}


}
// --------------------------------- COMBO TIME -----------------------------------------<3
// --------------------X X--------------------------<3
combo jableft {
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_LEFT,100);
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LEFT,0);
set_val(XB1_LB,0);
wait(1190);
set_val(XB1_RIGHT,100);
set_val(XB1_RT,100);
wait(20);
set_val(XB1_RIGHT,100);
set_val(XB1_RT,0);
wait(20);
set_val(XB1_RIGHT,100);
set_val(XB1_RT,100);
wait(20);
set_val(XB1_RIGHT,100);
set_val(XB1_RT,0);
wait(850);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT,100);
set_val(XB1_X,0);
wait(50);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,0);
wait(60);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,0);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
wait(20);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
set_val(XB1_LEFT,100);
wait(20);
set_val(XB1_X,100);
set_val(XB1_DOWN,0);
set_val(XB1_LEFT,100);
wait(20);
set_val(XB1_X,0);
set_val(XB1_RT,100);
wait(70);
}
// RIGHTSIDE ---------------X X---------------------<3
combo jabright {
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_RIGHT,100);
set_val(XB1_LB,100);
wait(20);
set_val(XB1_RIGHT,0);
set_val(XB1_LB,0);
wait(1190);
set_val(XB1_LEFT,100);
set_val(XB1_RT,100);
wait(20);
set_val(XB1_LEFT,100);
set_val(XB1_RT,0);
wait(20);
set_val(XB1_LEFT,100);
set_val(XB1_RT,100);
wait(20);
set_val(XB1_LEFT,100);
set_val(XB1_RT,0);
wait(850);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT,100);
set_val(XB1_X,0);
wait(50);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,0);
wait(60);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,0);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
wait(20);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
set_val(XB1_RIGHT,100);
wait(20);
set_val(XB1_X,100);
set_val(XB1_DOWN,0);
set_val(XB1_RIGHT,100);
wait(20);
set_val(XB1_X,0);
set_val(XB1_RT,100);
wait(70);
}


// -----------------------------fwd X X-----------------<3
combo fwdjableft {
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(60);
set_val(XB1_X,0);
wait(90);
set_val(XB1_X,100);
wait(60);
set_val(XB1_X,0);
wait(90);
wait(80);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(XB1_RIGHT,100);
wait(90);
set_val(XB1_DOWN, 0);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(80);
set_val(XB1_RIGHT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_RIGHT, 100);
set_val(XB1_Y, 100);
wait(40);
set_val(XB1_LEFT, 0);
set_val(XB1_Y, 0);


call(left);
}


// -----------------------Fwd X X-----------RIGHT SIDE-------------<3
combo fwdjabright {
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(60);
set_val(XB1_X,0);
wait(90);
set_val(XB1_X,100);
wait(60);
set_val(XB1_X,0);
wait(90);
wait(80);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(XB1_LEFT,100);
wait(90);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(80);
set_val(XB1_LEFT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_LEFT, 100);
set_val(XB1_Y, 100);
wait(40);
set_val(XB1_LEFT, 0);
set_val(XB1_Y, 0);


call(right);
}


// -----------------------Fwd Y Y-----------------------<3
combo fwdyleft {
// Left side of screen facing right
set_val(XB1_RIGHT,100);
set_val(XB1_LB,100);
wait(60);
set_val(XB1_LB,0);
wait(90);
set_val(XB1_LB,100);
wait(60);
set_val(XB1_LB,0);
wait(150);
wait(80);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(XB1_RIGHT,100);
wait(90);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(80);
set_val(XB1_RT,100);
set_val(XB1_RIGHT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_RIGHT, 100);
set_val(XB1_Y, 100);
wait(100);
set_val(XB1_LEFT, 0);
set_val(XB1_Y, 0);


call(left);
}


// -----------------------Fwd Y Y-----------RIGHT SIDE------------<3
combo fwdyright {
// Right side of screen facining left
set_val(XB1_LEFT,100);
set_val(XB1_LB,100);
wait(60);
set_val(XB1_LB,0);
wait(90);
set_val(XB1_LB,100);
wait(60);
set_val(XB1_LB,0);
wait(150);
wait(80);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(XB1_LEFT,100);
wait(90);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(80);
set_val(XB1_RT,100);
set_val(XB1_LEFT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_LEFT, 100);
set_val(XB1_Y, 100);
wait(100);
set_val(XB1_LEFT, 0);
set_val(XB1_Y, 0);


call(right);
}


// ---------------------BACK X-----------------------<3
combo Bjableft {
// Left side of screen facing right
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(10);
set_val(XB1_LEFT,100);
wait(50);
set_val(XB1_LEFT,0);
set_val(XB1_DOWN,100);
wait(50);
set_val(XB1_DOWN,100);
set_val(XB1_RIGHT,100);
wait(50);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(80);
set_val(XB1_RIGHT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_RIGHT, 100);
set_val(XB1_Y, 100);
wait(15);
set_val(XB1_LEFT, 0);
set_val(XB1_Y, 0);
wait(15);
set_val(XB1_X,100);
wait(40);
set_val(XB1_X,0);
wait(60);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(40);
set_val(XB1_X,100);

call(jableft);
}


// --------------------------------BACK X RIGHT SIDE-----------------<3
combo Bjabright {
// Right side of screen facining left
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(10);
set_val(XB1_RIGHT,100);
wait(50);
set_val(XB1_RIGHT,0);
set_val(XB1_DOWN,100);
wait(50);
set_val(XB1_DOWN,100);
set_val(XB1_LEFT,100);
wait(50);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(80);
set_val(XB1_LEFT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_LEFT, 100);
set_val(XB1_Y, 100);
wait(15);
set_val(XB1_LEFT, 0);
set_val(XB1_Y, 0);
wait(15);
set_val(XB1_X,100);
wait(40);
set_val(XB1_X,0);
wait(60);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(40);
set_val(XB1_X,100);


call(jabright);
}


// ----------------------COMBO LEFT AND RIGHT------------------------<3
combo left {
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LB,0);
wait(20);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LB,0);
wait(20);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(XB1_LEFT,100);
wait(90);
set_val(XB1_DOWN, 0);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_LEFT, 0);
set_val(XB1_X,100);
wait(1700);
set_val(XB1_RIGHT,100);
wait(140);
set_val(XB1_RIGHT,0);
wait(20);
set_val(XB1_UP,100);
wait(40);
set_val(XB1_UP,0);
wait(40);
set_val(XB1_X,100);
wait(800);
set_val(XB1_RIGHT,100);
set_val(XB1_A,100);
wait(20);
set_val(XB1_A,0);
wait(20);
set_val(XB1_RT,100);
wait(1300);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LB,0);
wait(40);
set_val(XB1_DOWN,100);
set_val(XB1_LS,100);
wait(500);
}
combo right {
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LB,0);
wait(20);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LB,0);
wait(20);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(XB1_RIGHT,100);
wait(90);
set_val(XB1_DOWN, 0);
set_val(XB1_RIGHT,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_RIGHT, 0);
set_val(XB1_X,100);
wait(1700);
set_val(XB1_LEFT,100);
wait(140);
set_val(XB1_LEFT,0);
wait(20);
set_val(XB1_UP,100);
wait(40);
set_val(XB1_UP,0);
wait(40);
set_val(XB1_X,100);
wait(800);
set_val(XB1_LEFT,100);
set_val(XB1_A,100);
wait(20);
set_val(XB1_A,0);
wait(20);
set_val(XB1_RT,100);
wait(1300);
set_val(XB1_LEFT,100);
set_val(XB1_X,100);
wait(20);
set_val(XB1_X,0);
wait(20);
set_val(XB1_LB,100);
wait(20);
set_val(XB1_LB,0);
wait(40);
set_val(XB1_DOWN,100);
set_val(XB1_LS,100);
wait(500);
}

WHITE 4ND N3RDY
10th May 15, 17:02
Here's a quick example of how to shorten this code up. Ex u have (combojableft):

set_val(XB1_X, 100);
Wait(20);
Set_val(XB1_X, 0);
Wait(20);

So your using extra lines to write out hold X 20 MS, Release X for 20 MS. U can simply write it out like this

Set_val(XB1_ X, 100);
Wait(20)
Wait(20)

This is exactly the same thing but optimized. It basically is saying X is held for 20 MS then the next 20 MS command is basically dead time nothing being pressed. U can go through and use this method to short in this lengthy code by 1/3rd the size. I'm by no means an expert at writing scripts but I do know this will help u out in what your trying to accomplish.

Excalibur
10th May 15, 17:22
I was made this for you before - Whats happen ?



// Remap of end buttons
remap XB1_LT -> XB1_RS;
remap XB1_RS -> XB1_LT;
remap XB1_RB -> XB1_LS;
remap XB1_LS -> XB1_RB;


int Right,Left;


main {




if(get_val(11)>60 || event_press(XB1_RIGHT)){
Right=16;Left=15;
}else if(get_val(11)<-60 || event_press(XB1_LEFT)){
Right=15;Left=16;
}


// X,X Left side
if( get_lval (XB1_RB) ){
combo_run (jab)
}




// X,X Right side
if( get_lval (XB1_LT) ){
combo_run (jab)
}




// fwd X, X Left side
if( get_val(XB1_RIGHT) && get_lval (XB1_X) ){
combo_run (fwdjab)
}




// fwd X, X Right side
if( get_val(XB1_LEFT) && get_lval (XB1_X) ){
combo_run (fwdjab)
}




// fwd y, y Left side
if( get_val(XB1_RIGHT) && get_lval (XB1_LB) ){
combo_run (fwdy)
}




// fwd y, y Right side
if( get_val(XB1_LEFT)&& get_lval (XB1_LB) ){
combo_run (fwdy)
}




// Back X Left side
if( get_val(XB1_LEFT) && get_lval (XB1_B) ){
combo_run (Bjab)
}




// Back X Right side
if( get_val(XB1_RIGHT) && get_lval (XB1_B) ){
combo_run (Bjab)
}




// cancel
if (get_val(XB1_Y)) {
combo_stop (jab)

combo_stop (fwdjab)

combo_stop (fwdy)

combo_stop (Bjab)

}




}
// --------------------------------- COMBO TIME -----------------------------------------<3
// --------------------X X--------------------------<3
combo jab {
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(Right,100);
set_val(XB1_LB,100);
wait(20);
wait(1190);
set_val(Left,100);
set_val(XB1_RT,100);
wait(20);
set_val(Left,100);
wait(20);
set_val(Left,100);
set_val(XB1_RT,100);
wait(20);
set_val(Left,100);
wait(850);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(Left,100);
wait(50);
set_val(Left,100);
set_val(XB1_X,100);
wait(100);
wait(60);
set_val(XB1_X,100);
wait(50);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
wait(20);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
set_val(Right,100);
wait(20);
set_val(XB1_X,100);
set_val(Right,100);
wait(20);
set_val(XB1_RT,100);
wait(70);
}
// RIGHTSIDE ---------------X X---------------------<3






// -----------------------------fwd X X-----------------<3
combo fwdjab {
set_val(Left,100);
set_val(XB1_X,100);
wait(60);
wait(90);
set_val(XB1_X,100);
wait(60);
wait(170);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(Left,100);
wait(90);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(80);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(Left, 100);
set_val(XB1_Y, 100);
wait(40);




call(left_right);
}




// -----------------------Fwd X X-----------RIGHT SIDE-------------<3




// -----------------------Fwd Y Y-----------------------<3
combo fwdy {
// Left side of screen facing right
set_val(Left,100);
set_val(XB1_LB,100);
wait(60);
wait(90);
set_val(XB1_LB,100);
wait(60);
wait(230);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(Left,100);
wait(90);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(80);
set_val(XB1_RT,100);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(Left, 100);
set_val(XB1_Y, 100);
wait(100);




call(left_right);
}




// -----------------------Fwd Y Y-----------RIGHT SIDE------------<3
// Right side of screen facining left


// ---------------------BACK X-----------------------<3
combo Bjab {
// Left side of screen facing right
set_val(Right,100);
set_val(XB1_X,100);
wait(20);
wait(10);
set_val(Right,100);
wait(50);
set_val(XB1_DOWN,100);
wait(50);
set_val(XB1_DOWN,100);
set_val(Left,100);
wait(50);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(80);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(Left, 100);
set_val(XB1_Y, 100);
wait(15);
wait(15);
set_val(XB1_X,100);
wait(40);
wait(60);
set_val(XB1_X,100);
wait(20);
wait(40);
set_val(XB1_X,100);

call(jab);//
}




// --------------------------------BACK X RIGHT SIDE-----------------<3
// Right side of screen facining left


// ----------------------COMBO LEFT AND RIGHT------------------------<3
combo left_right {
set_val(XB1_LB,100);
wait(20);
wait(20);
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(XB1_LB,100);
wait(20);
wait(20);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(Right,100);
wait(90);
set_val(Right,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(1700);
set_val(Left,100);
wait(140);
wait(20);
set_val(XB1_UP,100);
wait(40);
wait(40);
set_val(XB1_X,100);
wait(800);
set_val(Left,100);
set_val(XB1_A,100);
wait(20);
wait(20);
set_val(XB1_RT,100);
wait(1300);
set_val(Left,100);
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(XB1_LB,100);
wait(20);
wait(40);
set_val(XB1_DOWN,100);
set_val(XB1_LS,100);
wait(500);
}

WHITE 4ND N3RDY
10th May 15, 17:34
Thanks excalibur! I was just about to show him this method of optimizing facing left from right when writing code
int Right,Left;


main {




if(get_val(11)>60 || event_press(XB1_RIGHT)){
Right=16;Left=15;
}else if(get_val(11)<-60 || event_press(XB1_LEFT)){
Right=15;Left=16;
}


// X,X Left side
if( get_lval (XB1_RB) ){
combo_run (jab)
}




// X,X Right side
if( get_lval (XB1_LT) ){
combo_run (jab)
}




// fwd X, X Left side
if( get_val(XB1_RIGHT) && get_lval (XB1_X) ){
combo_run (fwdjab)
}




// fwd X, X Right side
if( get_val(XB1_LEFT) && get_lval (XB1_X) ){
combo_run (fwdjab)
}




// fwd y, y Left side
if( get_val(XB1_RIGHT) && get_lval (XB1_LB) ){
combo_run (fwdy)
}




// fwd y, y Right side
if( get_val(XB1_LEFT)&& get_lval (XB1_LB) ){
combo_run (fwdy)
}




// Back X Left side
if( get_val(XB1_LEFT) && get_lval (XB1_B) ){
combo_run (Bjab)
}




// Back X Right side
if( get_val(XB1_RIGHT) && get_lval (XB1_B) ){
combo_run (Bjab)
}




// cancel
if (get_val(XB1_Y)) {
combo_stop (jab)

combo_stop (fwdjab)

combo_stop (fwdy)

combo_stop (Bjab)

}




}

But im glade u beat me to it. I have enough trouble trying to understand all this myself and trying to explain it to someone else who is more confused than me LOL.

Excalibur
10th May 15, 18:41
Thanks excalibur! I was just about to show him this method of optimizing facing left from right when writing code.

But im glade u beat me to it. I have enough trouble trying to understand all this myself and trying to explain it to someone else who is more confused than me LOL.

This is actually very easy if you use the help of Script Manipulator.

Look at this tread Change Direction (http://cronusmax.com/forums/showthread.php?t=147541&p=997476&viewfull=1#post997476)

WHITE 4ND N3RDY
10th May 15, 19:28
Man I had no idea about this. Nice work. I Dont have a lot of time to make mods anymore so this will defenantly help shed time for me.

b2aSH
11th May 15, 13:56
Oh~ Thank you <3
I don't know how to find my other post... and didn't get any notifications. Sorry... Thank you guys~

b2aSH
11th May 15, 22:42
This is actually very easy if you use the help of Script Manipulator.

Look at this tread Change Direction (http://cronusmax.com/forums/showthread.php?t=147541&p=997476&viewfull=1#post997476)

Is there a way for me to hold down a button for the combo to run and cancel the combo when I let go of the button.

Excalibur
14th May 15, 18:05
Is there a way for me to hold down a button for the combo to run and cancel the combo when I let go of the button.


I think that in your case this is bad idea.

Try this one and give my feedback.



// Remap of end buttons
remap XB1_LT -> XB1_RS;
remap XB1_RS -> XB1_LT;
remap XB1_RB -> XB1_LS;
remap XB1_LS -> XB1_RB;




int Right,Left;
// Boolean variables
int bJab =FALSE;
int bFwdjab=FALSE;
int bFdwy =FALSE;
int bBjab =FALSE;


main {


if(get_val(11)>60 || event_press(XB1_RIGHT)){
Right=16;Left=15;
}else if(get_val(11)<-60 || event_press(XB1_LEFT)){
Right=15;Left=16;
}
// X,X Left side
if( get_lval (XB1_RB) && !bJab ){
Right=16;Left=15;
bJab=TRUE;
combo_run (jab)
}
// X,X Right side
if( get_lval (XB1_LT) && !bJab ){
Right=15;Left=16;
bJab=TRUE;
combo_run (jab)
}
// fwd X, X Left side
if( get_val(XB1_RIGHT) && get_val (XB1_X) && !bFwdjab ){
bFwdjab=TRUE;
set_val(XB1_X,0);
combo_run (fwdjab)
}
// fwd X, X Right side
if( get_val(XB1_LEFT) && get_val (XB1_X) && !bFwdjab){
bFwdjab=TRUE;
set_val(XB1_X,0);
combo_run (fwdjab)
}
// fwd y, y Left side
if( get_val(XB1_RIGHT) && get_val (XB1_LB) && !bFdwy ){
bFdwy=TRUE;
set_val(XB1_LB,0);
combo_run (fwdy)
}
// fwd y, y Right side
if( get_val(XB1_LEFT)&& get_val (XB1_LB) && !bFdwy){
bFdwy=TRUE;
set_val(XB1_LB,0);
combo_run (fwdy)
}
// Back X Left side
if( get_val(XB1_LEFT) && get_val (XB1_B) && !bBjab ){
bBjab=TRUE;
set_val(XB1_B,0);
combo_run (Bjab)
}
// Back X Right side
if( get_val(XB1_RIGHT) && get_val (XB1_B) && !bBjab){
bBjab=TRUE;
set_val(XB1_B,0);
combo_run (Bjab)
}
// cancel
if (get_val(XB1_Y)) {
combo_stop (jab);
combo_stop (fwdjab);
combo_stop (fwdy);
combo_stop (Bjab);
combo_stop (left_right);


bJab =FALSE;
bFwdjab=FALSE;
bFdwy =FALSE;
bBjab =FALSE;


}
// Block all face button
if(bJab || bFwdjab || bFdwy || bBjab){
if(get_val(XB1_Y))set_val(XB1_Y,0);
else if(get_val(XB1_B))set_val(XB1_B,0);
else if(get_val(XB1_A))set_val(XB1_A,0);
else if(get_val(XB1_X))set_val(XB1_X,0);
else if(get_val(XB1_LT))set_val(XB1_LT,0);
else if(get_val(XB1_LB))set_val(XB1_LB,0);
else if(get_val(XB1_RT))set_val(XB1_RT,0);
else if(get_val(XB1_RB))set_val(XB1_RB,0);
else if(get_val(XB1_LS))set_val(XB1_LS,0);
else if(get_val(XB1_RS))set_val(XB1_RS,0);


}




}
// --------------------------------- COMBO TIME -----------------------------------------<3
// --------------------X X--------------------------<3
combo jab {
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(Right,100);
set_val(XB1_LB,100);
wait(20);
wait(1190);
set_val(Left,100);
set_val(XB1_RT,100);
wait(20);
set_val(Left,100);
wait(20);
set_val(Left,100);
set_val(XB1_RT,100);
wait(20);
set_val(Left,100);
wait(850);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(Left,100);
wait(50);
set_val(Left,100);
set_val(XB1_X,100);
wait(100);
wait(60);
set_val(XB1_X,100);
wait(50);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
wait(20);
set_val(XB1_X,100);
set_val(XB1_DOWN,100);
set_val(Right,100);
wait(20);
set_val(XB1_X,100);
set_val(Right,100);
wait(20);
set_val(XB1_RT,100);
wait(70);
bJab =FALSE;
bBjab =FALSE;
}
// RIGHTSIDE ---------------X X---------------------<3












// -----------------------------fwd X X-----------------<3
combo fwdjab {
set_val(Left,100);
set_val(XB1_X,100);
wait(60);
wait(90);
set_val(XB1_X,100);
wait(60);
wait(170);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(Left,100);
wait(90);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(80);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(Left, 100);
set_val(XB1_Y, 100);
wait(40);
call(left_right);
}








// -----------------------Fwd X X-----------RIGHT SIDE-------------<3








// -----------------------Fwd Y Y-----------------------<3
combo fwdy {
// Left side of screen facing right
set_val(Left,100);
set_val(XB1_LB,100);
wait(60);
wait(90);
set_val(XB1_LB,100);
wait(60);
wait(230);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(Left,100);
wait(90);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(80);
set_val(XB1_RT,100);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(Left, 100);
set_val(XB1_Y, 100);
wait(100);








call(left_right);
}








// -----------------------Fwd Y Y-----------RIGHT SIDE------------<3
// Right side of screen facining left




// ---------------------BACK X-----------------------<3
combo Bjab {
// Left side of screen facing right
set_val(Right,100);
set_val(XB1_X,100);
wait(20);
wait(10);
set_val(Right,100);
wait(50);
set_val(XB1_DOWN,100);
wait(50);
set_val(XB1_DOWN,100);
set_val(Left,100);
wait(50);
set_val(Left,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(80);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(XB1_X,100);
wait(50);
set_val(Left, 100);
set_val(XB1_X,100);
wait(100);
set_val(Left, 100);
set_val(XB1_Y, 100);
wait(15);
wait(15);
set_val(XB1_X,100);
wait(40);
wait(60);
set_val(XB1_X,100);
wait(20);
wait(40);
set_val(XB1_X,100);

call(jab);//
}








// --------------------------------BACK X RIGHT SIDE-----------------<3
// Right side of screen facining left




// ----------------------COMBO LEFT AND RIGHT------------------------<3
combo left_right {
set_val(XB1_LB,100);
wait(20);
wait(20);
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(XB1_LB,100);
wait(20);
wait(20);
set_val(XB1_DOWN,100);
wait(80);
set_val(XB1_DOWN,100);
set_val(Right,100);
wait(90);
set_val(Right,100);
set_val(XB1_X,100);
wait(50);
set_val(XB1_X,100);
wait(1700);
set_val(Left,100);
wait(140);
wait(20);
set_val(XB1_UP,100);
wait(40);
wait(40);
set_val(XB1_X,100);
wait(800);
set_val(Left,100);
set_val(XB1_A,100);
wait(20);
wait(20);
set_val(XB1_RT,100);
wait(1300);
set_val(Left,100);
set_val(XB1_X,100);
wait(20);
wait(20);
set_val(XB1_LB,100);
wait(20);
wait(40);
set_val(XB1_DOWN,100);
set_val(XB1_LS,100);
wait(500);
bFwdjab=FALSE;
bFdwy =FALSE;
}