First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
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: 5.58 Votes: 12
(10 being the highest)
» 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!

Comments

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

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
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: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.