Well my friend, I have all the info to make all changes.
1) The animations marked in red are those that fail to advance to the next lesson, because they do not have a frame with has attackbox.
The main problem comes qhen the the characters spawn an entity to attack.
To solve this would be necessary (in the animations in red) , that the lesson is effective at the moment the animation is executed, without the need a frame with it has attackbox.
N° LESSON Name Animation
1 COMBO attack3
2 JUMPATTACK anim jumpforward
3 JUMPATTACK2 anim jumpattack2
4 JUMPATTACK3 anim jumpattack3
5 ATTACKBACKWARD anim attackbackward
6 GRABATTACK anim grabattack2
7 GRABBACKWARD anim grabbackward
8 GRABFORWARD anim grabforward
9 GRABDOWN anim grabdown
10 GRABUP anim grabup
11 MORTAL GRAB anim freespecial9
12 DIVE CATCH anim jumpspecial
13 GROUND ATTACK anim follow 15
14 COMBO BREAKER anim freespecial41
15 RISEATTACK anim riseattack
16 SUPER RISEATTACK anim freespecial8
17 SPECIAL anim freespecial6
18 SUPER ATTACK anim special
19 SUPER COMBO anim freespecial5
20 FINAL COMBO anim freespecial33
21 NO MERCY anim follow32
22 FATALITY1 anim follow20
23 FATALITY2 anim follow42
24 FATALITY3 anim follow43
25 FATALITY4 anim follow44
26 Standard Stage Fat. anim freespecial35
2) There are certain animations that would not look good if the lesson ends when they are still running. But if we delete the reset and only leave it for certain animations, there is no problem.
Ideally, the reset will be executed after the animations of the No Mercy and the 4 fatalities are finished.
21 NO MERCY anim follow32
22 FATALITY1 anim follow20
23 FATALITY2 anim follow42
24 FATALITY3 anim follow43
25 FATALITY4 anim follow44
Once the Standard Stage Fatality is finished, it would be best if there was no reset.
And that will show a message saying "TRaining Complete", and then send us to the menu.
3) Here the updated Lecmun.c:
Code:
void main()
{// Deny damage if attacked with wrong animation
void self = getlocalvar("self"); //Get calling entity.
int HP = getentityproperty(self, "health");
void target = getentityproperty(self,"opponent");
void TAnim = getentityproperty(target, "animationID");
int Damage = getlocalvar("damage"); //Get received damage
int Code = getindexedvar("Lesn");
int Warn = getindexedvar("Wait");
if(Code==NULL()){
Code = 0;
}
if(Warn==NULL()){
Warn = 0;
}
if(Code<26){
void LAnim = Lesson(Code);
if(TAnim == LAnim && Warn==0){
setindexedvar("Lesn", Code+1);
setindexedvar("Wait", 1);
} else {
changeentityproperty(self, "health", HP + Damage);
}
}
}
void Lesson(int Code)
{// Selects animation constant based on defined code
void Anim;
if(Code==25){
Anim = openborconstant("ANI_FREESPECIAL35");
} else if(Code==24){
Anim = openborconstant("ANI_FOLLOW44");
} else if(Code==23){
Anim = openborconstant("ANI_FOLLOW43");
} else if(Code==22){
Anim = openborconstant("ANI_FOLLOW42");
} else if(Code==21){
Anim = openborconstant("ANI_FOLLOW20");
} else if(Code==20){
Anim = openborconstant("ANI_FOLLOW32");
} else if(Code==19){
Anim = openborconstant("ANI_FREESPECIAL33");
} else if(Code==18){
Anim = openborconstant("ANI_FREESPECIAL5");
} else if(Code==17){
Anim = openborconstant("ANI_SPECIAL");
} else if(Code==16){
Anim = openborconstant("ANI_FREESPECIAL6");
} else if(Code==15){
Anim = openborconstant("ANI_FREESPECIAL8");
} else if(Code==14){
Anim = openborconstant("ANI_RISEATTACK");
} else if(Code==13){
Anim = openborconstant("ANI_FREESPECIAL41");
} else if(Code==12){
Anim = openborconstant("ANI_FOLLOW15");
} else if(Code==11){
Anim = openborconstant("ANI_JUMPSPECIAL");
} else if(Code==10){
Anim = openborconstant("ANI_FREESPECIAL9");
} else if(Code==9){
Anim = openborconstant("ANI_GRABUP");
} else if(Code==8){
Anim = openborconstant("ANI_GRABDOWN");
} else if(Code==7){
Anim = openborconstant("ANI_GRABFORWARD");
} else if(Code==6){
Anim = openborconstant("ANI_GRABBACKWARD");
} else if(Code==5){
Anim = openborconstant("ANI_GRABATTACK2");
} else if(Code==4){
Anim = openborconstant("ANI_ATTACKBACKWARD");
} else if(Code==3){
Anim = openborconstant("ANI_JUMPATTACK3");
} else if(Code==2){
Anim = openborconstant("ANI_JUMPATTACK2");
} else if(Code==1){
Anim = openborconstant("ANI_JUMPFORWARD");
} else {
Anim = openborconstant("ANI_ATTACK3");
}
return Anim;
}