Fighting Tutorials
#1-3
animation.
Create a guy on the left side of the screen
facing right. make him a movie clip.
double click on the movie clip and
make the kicking foot a movie clip and instance name it foot1
make the punchning arm a movie clip and instance name it arm1
create a punching animation.
label the first frame of it punch. on the last frame of the
kick animation put the actions GotoAndStop(1); After that
Create a kick animation.label the first frame of the kick
animation kick.on the last frame of the kick animation
Put the actions GotoAndStop(1);Next Create A Falling back
frame.Label the first frame of it fall.On the last frame put
the actions GotoAndStop(1);On The arm in the first frame of the
player movieclip. Put the actions
onClipEvent (enterFrame) {
if (Key.isDown(87)) {
_parent.gotoAndPlay(“punch”);
}
if (Key.isDown(83)) {
_parent.gotoAndPlay(“kick”);
}
}
And these actions on the first frame
stop();
Create another guy on the other side and make him a movie clip.
double click on the movie clip and make the kicking foot a movie
clip and instance name it foot2 make the punching arm a movie clip
and instance name it arm2 create a punching animation.
label the first frame of it punch. on the last frame of the
kick animation put the actions GotoAndStop(1); After that
Create a kick animation.label the first frame of the kick
animation kick.on the last frame of the kick animation
Put the actions GotoAndStop(1);Next Create A Falling back
frame.Label the first frame of it fall.On the last frame put
the actions GotoAndStop(1);On The arm in the first frame of the
player movieclip. Put the actions
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
_parent.gotoAndPlay(“punch”);
}
if (Key.isDown(Key.DOWN)) {
_parent.gotoAndPlay(“kick”);
}
}
And on the first frame put the actions
stop();
press the back arrow to get to the main timeline and
instance name the guy on the left player1. instance name
the guy on the right player2.
put these actions in player 1
onClipEvent (load) {
movement1 = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
this._x = this._x-movement1;
step = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x+movement1;
step = 2;
}
}
put these actions in player 2
onClipEvent (load) {
movement1 = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
this._x = this._x-movement1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(39)) {
this._x = this._x+movement1;
}
}
Test it all the animations should be done keys are W,a,s,d up,down,left,right.
health and damage will be done in next tutorial.
Tutorial done.
WOOT WOOT