Hi - For whatever reason the player character wont stop running after he performs a run cancel attack.
Here's the code for the running animation
All "cancel "attacks will stop the running animation after they are done animating even if I'm holding left or right.
except for one which is named (cancel 0 5 0 S freespecial42) - this one continues to run even after the animation of that attack is over if I continue to hold left or right, and I don't want that.
This is the code for Freespecial42
EDIT:
Here's an example of one of the running attack that works correctly by not letting the player continue the run animation
by holding left or right after the freespecial38 attack is over.
Any help would be appreciated.
Here's the code for the running animation
Code:
anim run
@script
void self = getlocalvar("self");
if(frame==0){
changeentityproperty(self, "Subject_to_Platform", 1);
}
if(frame==1){
changeentityproperty(self, "Subject_to_Platform", 1);
}
if(frame==2){
changeentityproperty(self, "Subject_to_Platform", 1);
changelevelproperty("scrollspeed", 1);
}
if(frame==3){
changeentityproperty(self, "Subject_to_Platform", 1);
}
if(frame==4){
changeentityproperty(self, "Subject_to_Platform", 1);
}
if(frame==5){
changeentityproperty(self, "Subject_to_Platform", 1);
}
@end_script
loop 1
delay 9
offset 77 170
bbox 60 55 40 100
cancel 0 5 0 A2 freespecial38
cancel 0 5 0 A3 freespecial53
cancel 0 5 0 A4 freespecial53
cancel 0 5 0 S freespecial42 ###########################why wont the running animation stop?
frame data/chars/billy/r1.gif
frame data/chars/billy/r2.gif
sound data/sounds/step1.wav
frame data/chars/billy/r3.gif
frame data/chars/billy/r4.gif
frame data/chars/billy/r5.gif
sound data/sounds/step1.wav
frame data/chars/billy/r6.gif
All "cancel "attacks will stop the running animation after they are done animating even if I'm holding left or right.
except for one which is named (cancel 0 5 0 S freespecial42) - this one continues to run even after the animation of that attack is over if I continue to hold left or right, and I don't want that.
This is the code for Freespecial42
Code:
anim freespecial42 # special jumpattack
loop 0
delay 7
offset 77 140
jumpframe 0 5 3
dropframe 2
landframe 10
hitfx data/sounds/beatt2.wav
@cmd degravity -1
frame data/chars/billy/j1.gif
frame data/chars/billy/jk1.gif
sound data/chars/billy/dragon2.wav
frame data/chars/billy/special3.gif
delay 6
attack 80 85 63 55 20 1
dropv 3 3
forcedirection -1
@cmd degravity -1.5
frame data/chars/billy/special4.gif
bbox 60 90 40 50
frame data/chars/billy/special4.gif
delay 7
offset 77 155
attack 0 0 0 0 0 0
frame data/chars/billy/sp5.gif
frame data/chars/billy/sp5.gif
frame data/chars/billy/sp5.gif
frame data/chars/billy/sp5.gif
delay 500
frame data/chars/billy/sp5.gif
offset 77 170
delay 4
@cmd degravity -1
@cmd dasher 1.5 0 0
frame data/chars/billy/rise2.gif
frame data/chars/billy/rise2.gif
@cmd dasher 1 0 0
frame data/chars/billy/rise2.gif
frame data/chars/billy/rise2.gif
@cmd dasher 0.5 0 0
frame data/chars/billy/rise2.gif
frame data/chars/billy/rise2.gif
@cmd dasher 0 0 0
frame data/chars/billy/j0.gif
frame data/chars/billy/idle.gif
EDIT:
Here's an example of one of the running attack that works correctly by not letting the player continue the run animation
by holding left or right after the freespecial38 attack is over.
Code:
anim freespecial38 # runattack 2
loop 0
delay 3
offset 77 170
bbox 60 55 40 100
hitfx data/sounds/beatt2.wav
@cmd changeentityproperty getlocalvar("self") "aiflag" "running" 0
@cmd dasher 2 0 0
frame data/chars/billy/aa1.gif
frame data/chars/billy/aa1.gif
frame data/chars/billy/aa1.gif
frame data/chars/billy/aa1.gif
attack 90 95 72 34 20 1
dropv 3.5 3
@cmd dasher 2.5 0 0
frame data/chars/billy/ra3.gif
frame data/chars/billy/ra3.gif
@cmd dasher 2 0 0
frame data/chars/billy/ra3.gif
frame data/chars/billy/ra3.gif
@cmd dasher 1.5 0 0
frame data/chars/billy/ra3.gif
frame data/chars/billy/ra3.gif
attack 0 0 0 0 0
@cmd dasher 1 0 0
frame data/chars/billy/ra3.gif
frame data/chars/billy/ra3.gif
@cmd dasher 0.5 0 0
frame data/chars/billy/ra2.gif
frame data/chars/billy/ra2.gif
frame data/chars/billy/ra2.gif
delay 6
@cmd dasher 0 0 0
frame data/chars/billy/idle.gif
Any help would be appreciated.