00:00
00:00
Newgrounds Background Image Theme

nuggetior just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Fighting game help.

1,839 Views | 8 Replies
New Topic Respond to this Topic

Fighting game help. 2001-03-13 16:45:12


I need help w/ a game thats going to be like the Puff Daddy Assassin mission. First, how do you get make the health bar go downwhen the character punches you. Second, how do you make the block function to prevent th enemy from taking away health. And last, how do I make health bars. I'm OK with flash and Action Script. I'm using Flash 5.

Response to Fighting game help. 2001-03-13 23:01:45


I'll try to describe things as best I can...
I am assuming you have some knowledge of the Tell Target action and the If statement. Also, I'm simply giving you examples of how to make a health bar/tell if you've blocked a punch.

For the health bar, you need to use the Tell Target action. Create a movieclip of the health bar, and have it so in every frame a little more health is gone (so if you played this movieclip, it would show the health bar go from full to empty). Put a stop action on the first frame, and give the movieclip an instance name of health.
Now goto the button you'll have to click to punch the enemy. Give the button this action:
On Press, Begin Tell Target /health goto next frame.

As for the blocking technique, you'll have to use the If statement, and I'm gonna be rough on this one.
When you block, have an action such as;
Set Variable: "actions" = blocked
When you stop blocking, have an action such as;
Set Variable: "actions" = unblocked
..
Now, when the enemy takes a shot at you, have an action such as;
If ("actions" = "blocked")
Goto and stop frame 1
Else
Goto and play frame 2
End if
..
Of course, you'd have to fit this all into your own settings, as this is nothing but a general idea of how to do things. If I get my ftp working again I'll upload some sample swf's.


BBS Signature

Response to Fighting game help. 2001-03-14 00:41:24


At 3/13/01 11:01 PM, chase wrote: I'll try to describe things as best I can...
I am assuming you have some knowledge of the Tell Target action and the If statement. Also, I'm simply giving you examples of how to make a health bar/tell if you've blocked a punch.

For the health bar, you need to use the Tell Target action. Create a movieclip of the health bar, and have it so in every frame a little more health is gone (so if you played this movieclip, it would show the health bar go from full to empty). Put a stop action on the first frame, and give the movieclip an instance name of health.
Now goto the button you'll have to click to punch the enemy. Give the button this action:
On Press, Begin Tell Target /health goto next frame.

As for the blocking technique, you'll have to use the If statement, and I'm gonna be rough on this one.
When you block, have an action such as;
Set Variable: "actions" = blocked
When you stop blocking, have an action such as;
Set Variable: "actions" = unblocked
..
Now, when the enemy takes a shot at you, have an action such as;
If ("actions" = "blocked")
Goto and stop frame 1
Else
Goto and play frame 2
End if
..
Of course, you'd have to fit this all into your own settings, as this is nothing but a general idea of how to do things. If I get my ftp working again I'll upload some sample swf's.

Thanks but I want have movie clips (the enemy's fists) ands I want it to when it reaches a certain frame, thewn the life your life goes down. Also I want it to where when you push a keyboard button the your character puches the enemy.

Response to Fighting game help. 2001-03-14 13:32:25


In the fists movieclip, at that frame where you want your health to go down, have an action that tells your health movieclip to goto the next frame (which will be your health bar going down a little). Remember, this is using Tell Target.

As for pressing a key to make your fighter punch, you'll need a button (and put the button off of the screen so it won't interfere with the game). Give the button an action that tells your fighter movieclip to go to the punching animation when a key is pressed. I've attached a pic of how you generally want your button to be set up.

Fighting game help.


BBS Signature

Response to Fighting game help. 2001-03-14 17:24:45


I'm using the telltarget action but I still have problems. I gave the main character's health bar an instance name of "/your health". By the way, you can't see your character, it's like a 1st person veiw like the puff daddy mission. Anyways, on the frame where I want your health to go down I put this script:
tellTarget ("/your health") {
}
nextFrame ();

But the health still won't go down. The Output window says "target not found". Also I have the Left fist movie clip, but when I push the "b" to play the clip, that doesn't work either. Here's the script for the button:
on (release, keyPress "b") {
}
on (release) {
tellTarget ("L punch") {
play ();
}
}

I checked all the instance names and stuff like that over and over but that doesn't work!! Help! I'm using Flash 5 by the way. Chase it looks like you were using Flash 4 in the pic.

Response to Fighting game help. 2001-03-14 18:45:19


Yeah, I am using Flash 4.
It looks like you are using Flash 5's expert actionscript mode, where you have to type in the actionscript entirely yourself. I don't know if this is what you want, but to switch to normal mode hold Ctrl and press N while the actionscripting window is up. That will let you write your actionscript much more like how it's done in Flash 4, which is easier.

If you want to script your movie in expert mode, I'm afraid I can't help you much. I do have both Flash 4 and 5, but I'm not any good with the expert scripting.


BBS Signature

Response to Fighting game help. 2001-03-15 00:29:51


At 3/14/01 06:45 PM, chase wrote: Yeah, I am using Flash 4.
It looks like you are using Flash 5's expert actionscript mode, where you have to type in the actionscript entirely yourself. I don't know if this is what you want, but to switch to normal mode hold Ctrl and press N while the actionscripting window is up. That will let you write your actionscript much more like how it's done in Flash 4, which is easier.

If you want to script your movie in expert mode, I'm afraid I can't help you much. I do have both Flash 4 and 5, but I'm not any good with the expert scripting.

Nope it's in normal I checked

Response to Fighting game help. 2001-03-15 20:35:53


o my god man. i get no love up in the ng bbs. when i posted something like this no one would help me. u guys r mean. doodler, work on my game dammit.

Response to Fighting game help. 2001-03-15 23:31:00


At 3/15/01 08:35 PM, qwertyuiop wrote: o my god man. i get no love up in the ng bbs. when i posted something like this no one would help me. u guys r mean. doodler, work on my game dammit.

I love you.

Fighting game help.