Search tutorials
2 Player Fighting Game Part 3
open up the Fla from the previous tutorial
Note:if you missed the last tutorial? View it here!
http://c.1asphost.com/finarial2/
Step2 Draw a health bar. Make its width 200 and make its height 20. Make it a movie clip and make its registration on the left center. Instance name it health1 put this movie clip in the top left corner of the stage.
Step 3 Do the same think as step 2 but instance name it health2 and put it in the top right corner of the stage.
Step4 double click on the player 1 movie clip. add these actions on the drawn stickman movie clip.
onClipEvent (enterFrame) {
if (hitTest(_root.player2.hit)) {
_root.health1._xscale -= 1;
_parent.gotoAndPlay(fall);
}
If (_root.health1._xscale<0){
_root.gotoAndStop(2win);}
}
Step5 now double click on the player 2. add these actions to the stickman movie clip.
onClipEvent (enterFrame) {
if (hitTest(_root.player1.hit)) {
_root.health2._xscale -= 1;
_parent.gotoAndPlay(fall);
}
If (_root.health2._xscale<0){
_root.gotoAndStop(1win);}
}
Step6 now go back to the main timeline. Put these actions on frame1.
div class=notes>stop();
Step 3 Do the same think as step 2 but instance name it health2 and put it in the top right corner of the stage.
Step4 double click on the player 1 movie clip. add these actions on the drawn stickman movie clip.
onClipEvent (enterFrame) {
if (hitTest(_root.player2.hit)) {
_root.health1._xscale -= 1;
_parent.gotoAndPlay(fall);
}
If (_root.health1._xscale<0){
_root.gotoAndStop(2win);}
}
Step5 now double click on the player 2. add these actions to the stickman movie clip.
onClipEvent (enterFrame) {
if (hitTest(_root.player1.hit)) {
_root.health2._xscale -= 1;
_parent.gotoAndPlay(fall);
}
If (_root.health2._xscale<0){
_root.gotoAndStop(1win);}
}
Step6 now go back to the main timeline. Put these actions on frame1.
div class=notes>stop();
onClipEvent (enterFrame) {
if (hitTest(_root.player2.hit)) {
_root.health1._xscale -= 1;
_parent.gotoAndPlay(fall);
}
If (_root.health1._xscale<0){
_root.gotoAndStop(2win);}
}
Step5 now double click on the player 2. add these actions to the stickman movie clip.
onClipEvent (enterFrame) {
if (hitTest(_root.player1.hit)) {
_root.health2._xscale -= 1;
_parent.gotoAndPlay(fall);
}
If (_root.health2._xscale<0){
_root.gotoAndStop(1win);}
}
Step6 now go back to the main timeline. Put these actions on frame1.
div class=notes>stop();
Step7 insert 2 frames on the main timeline. Label them 1win and 2win.
Step8 on the 1win page put text saying Player 2 wins!. Next put text saying play again. Lasso it and make it a button. Put in these actions
on (release){
_root.gotoAndStop(1);
}
Step 9 on the 2win page put text saying Player 2 wins!. Next put text saying play again. Lasso it and make it a button. Put in these actions
on (release){
_root.gotoAndStop(1);
}
------------------------------------------------------------------------------
And there you go a basic 2 player fighting game engine! You could do much more to this engine such as add more attacks, multiple players, 1 player ai which I will probably make a tutorial on in the future
If you have any questions email me at Masta_Elda@juno.com
My site will soon be back up it is currently under construction
Old site: http://c.1asphost.com/finarial2/ if you liked this tutorial
Check out my site Thanks.
on (release){
_root.gotoAndStop(1);
}
Step 9 on the 2win page put text saying Player 2 wins!. Next put text saying play again. Lasso it and make it a button. Put in these actions
on (release){
_root.gotoAndStop(1);
}
------------------------------------------------------------------------------
And there you go a basic 2 player fighting game engine! You could do much more to this engine such as add more attacks, multiple players, 1 player ai which I will probably make a tutorial on in the future
If you have any questions email me at Masta_Elda@juno.com
My site will soon be back up it is currently under construction
Old site: http://c.1asphost.com/finarial2/ if you liked this tutorial
Check out my site Thanks.
| » Level Intermediate |
|
Added: 2006-08-09 Rating: 5.58 Votes: 12 |
| » Author |
| 13 yr old Flash Masta!!! Level 40 Night Elf Hunter!!! Booyah moma |
| » Download |
| Download the files used in this tutorial. |
| Download (16 kb) |
| » Forums |
| More help? Search our boards for quick answers! |


Comments
There are no comments yet. Be the first to comment!