First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Ownage Productions | Website: http://c.1asphost.com/finarial2/

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();

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.

» Level Intermediate

Added: 2006-08-09
Rating: 6.47 Votes: 15
» Author
13 yr old Flash Masta!!! Level 40 Night Elf Hunter!!! Booyah moma
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.