Forum Topic: Fighting game help.

(514 views • 8 replies)

This topic is 1 page long.

<< < > >>
Questioning

szkjet

Reply To Post Reply & Quote

Posted at: 3/13/01 04:45 PM

szkjet NEUTRAL LEVEL 06

Sign-Up: 01/27/01

Posts: 28

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.


None

korded

Reply To Post Reply & Quote

Posted at: 3/13/01 11:01 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

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.


None

szkjet

Reply To Post Reply & Quote

Posted at: 3/14/01 12:41 AM

szkjet NEUTRAL LEVEL 06

Sign-Up: 01/27/01

Posts: 28

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.


None

korded

Reply To Post Reply & Quote

Posted at: 3/14/01 01:32 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

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.


None

szkjet

Reply To Post Reply & Quote

Posted at: 3/14/01 05:24 PM

szkjet NEUTRAL LEVEL 06

Sign-Up: 01/27/01

Posts: 28

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.


None

korded

Reply To Post Reply & Quote

Posted at: 3/14/01 06:45 PM

korded EVIL LEVEL 06

Sign-Up: 02/06/00

Posts: 1,094

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.


None

szkjet

Reply To Post Reply & Quote

Posted at: 3/15/01 12:29 AM

szkjet NEUTRAL LEVEL 06

Sign-Up: 01/27/01

Posts: 28

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


None

qwertyuiop

Reply To Post Reply & Quote

Posted at: 3/15/01 08:35 PM

qwertyuiop DARK LEVEL 06

Sign-Up: 11/29/00

Posts: 8

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.


None

szkjet

Reply To Post Reply & Quote

Posted at: 3/15/01 11:31 PM

szkjet NEUTRAL LEVEL 06

Sign-Up: 01/27/01

Posts: 28

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.


All times are Eastern Standard Time (GMT -5) | Current Time: 12:06 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!