PDA

View Full Version : Macro Cancel



Hambi
10th January 16, 15:00
Hello!
I have written many combo scripts in SSF4 AE on PS3. They work well. But now the problem is, I can't cancel any of the running macros :(. Therefor data conflicts occur. Here is the main:


int RIGHT;
int LEFT;
main{

if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_L1)){
if(combo_running(Dudley1)){
combo_stop(Dudley1):
} else {
combo_run(Dudley1);
if (get_val(PS3_SQUARE)){combo_stop(Dudley1);}
}
}


if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_L2)){
if(combo_running(Dudley2)){
combo_stop(Dudley2):
} else {
combo_run(Dudley2);
if (get_val(PS3_SQUARE)){combo_stop(Dudley2);}
}
}


if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_CROSS)){
if(combo_running(Dudley3)){
combo_stop(Dudley3):
} else {
combo_run(Dudley3);
if (get_val(PS3_SQUARE)){combo_stop(Dudley3);}
}
}


if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_CIRCLE)){
if(combo_running(Dudley4)){
combo_stop(Dudley4):
} else {
combo_run(Dudley4);
if (get_val(PS3_SQUARE)){combo_stop(Dudley4);}
}
}
}


Who can help me?

Excalibur
13th January 16, 06:02
Hello!
I have written many combo scripts in SSF4 AE on PS3. They work well. But now the problem is, I can't cancel any of the running macros :(. Therefor data conflicts occur. Here is the main:


int RIGHT;
int LEFT;
main{

if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_L1)){
if(combo_running(Dudley1)){
combo_stop(Dudley1):
} else {
combo_run(Dudley1);
if (get_val(PS3_SQUARE)){combo_stop(Dudley1);}
}
}


if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_L2)){
if(combo_running(Dudley2)){
combo_stop(Dudley2):
} else {
combo_run(Dudley2);
if (get_val(PS3_SQUARE)){combo_stop(Dudley2);}
}
}


if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_CROSS)){
if(combo_running(Dudley3)){
combo_stop(Dudley3):
} else {
combo_run(Dudley3);
if (get_val(PS3_SQUARE)){combo_stop(Dudley3);}
}
}


if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_CIRCLE)){
if(combo_running(Dudley4)){
combo_stop(Dudley4):
} else {
combo_run(Dudley4);
if (get_val(PS3_SQUARE)){combo_stop(Dudley4);}
}
}
}


Who can help me?


But you have cancel - if you press again the same button which you activate combo, it will cancel. So I don't understand what the problem is.

Swizzy
13th January 16, 09:59
Your indentation is a bit wonky so you may have missed out on some of what your script is doing, and you're duplicating the same code several times... it won't make a difference if the end result is the same for everytime you do it in the main section...


//Posted by Hambi, a member of the community in the CronusMAX Forums - http://www.cronusmax.com/forums

//Posted : Sunday 10th of January, 2016 19:00 UTC


int RIGHT;
int LEFT;
main{

if(get_val(11) >20 || get_val(16)){
RIGHT=16;LEFT=15;
}
if(get_val(11) <-20 || get_val(15)){
RIGHT=15;LEFT=16;
}
if(event_press(PS3_L1)){
if(combo_running(Dudley1)){
combo_stop(Dudley1):
} else {
combo_run(Dudley1);
if (get_val(PS3_SQUARE)) {
combo_stop(Dudley1);
}
}
}
if(event_press(PS3_L2)){
if(combo_running(Dudley2)){
combo_stop(Dudley2):
} else {
combo_run(Dudley2);
if (get_val(PS3_SQUARE)) {
combo_stop(Dudley2);
}
}
}
if(event_press(PS3_CROSS)){
if(combo_running(Dudley3)){
combo_stop(Dudley3):
} else {
combo_run(Dudley3);
if (get_val(PS3_SQUARE)) {
combo_stop(Dudley3);
}
}
}
if(event_press(PS3_CIRCLE)){
if(combo_running(Dudley4)){
combo_stop(Dudley4):
} else {
combo_run(Dudley4);
if (get_val(PS3_SQUARE)){
combo_stop(Dudley4);
}
}
}
}


What your script does is, if you hold Square while pressing either of these buttons: L1, L2, Cross, Circle whatever combo they were supposed to start doesn't run because it's canceled straight away... and if you press either of those buttons twice while the combo is running it'll cancel it...

You didn't paste your combo sections tho...

Excalibur
13th January 16, 11:00
Thank you Swizzy , I don't enough time when I answered ( I hurried to work ).