# Fighting tutorial 2

**URL:** https://forum.kirupa.com/t/fighting-tutorial-2/162627
**Category:** Uncategorized
**Created:** [September 14, 2005, 10:23pm UTC](https://forum.kirupa.com/t/fighting-tutorial-2/162627 "2005-09-14T22:23:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wats120](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@wats120](https://forum.kirupa.com/u/wats120)
#### Post date: [September 14, 2005, 10:23pm UTC](https://forum.kirupa.com/t/fighting-tutorial-2/162627/1 "2005-09-14T22:23:45Z")

</div>

Fighting Tutorials  
#2-3  
Actions

Open the fla. file from the last tutorial.

put these actions in the player1.

onClipEvent (enterFrame) {  
if (hitTest(\_root.player2.arm2)) {  
\_root.health1.nextframe();  
\_root.player1.gotoandplay(“fall”);  
}  
}  
onClipEvent (enterFrame) {  
if (hitTest(\_root.player2.foot2)) {  
\_root.health1.nextframe();  
\_root.player1.gotoandplay(“fall”);  
}  
}

put these actions in the player2.

onClipEvent (enterFrame) {  
if (hitTest(\_root.player1.arm1)) {  
\_root.health2.nextframe();  
\_root.player2.gotoandplay(“fall”);  
}  
}  
onClipEvent (enterFrame) {  
if (hitTest(\_root.player1.foot1)) {  
\_root.health2.nextframe();  
\_root.player2.gotoandplay(“fall”);  
}  
}

now create a health bar.

make it a movie clip.

instance name it health1.

double click on it and make the

health bar gently getting smaller.

on the last frame of the health bar movie clip put the actions \_root.gotoandstop(“2wins”);

make another health bar.

instance name it health2.

then do the same thing as the

first health bar.

on the last frame of the health bar movie clip put the actions \_root.gotoandstop(“1wins”);

If you test the tutorial and nothing happens or need help post on my website forum  
at

[ZergHelp.com](http://ZergHelp.com)

Tutorial done  
WOOT WOOT
