So I'm making a street fighter style game, and the enemy is just an Movie Clip that moves with a motion tween, and the player is a movie clip controlled by the arrow keys. I've got that much done. I've also got the player able to kick/punch with x and z.
Now I'm planning on just doing a hit test and that takes health off the enemy, and if he hits you it's the same.
But I can't think of a way to determine who hits first.. Like, maybe if the player was in range of the enemy for one second, then he would attack or something? I'm not sure.
This game is for an assignment, most people are just doing mouse maze games and stuff, so the teacher doesn't expect anything too complex. We have to use Actionscript 2 by the way.
If someone could help me that'd be great. Thanks in advance!
Hit test
Page 1 of 12 Replies - 2596 Views - Last Post: 06 October 2012 - 07:10 AM
Replies To: Hit test
#2
Re: Hit test
Posted 30 September 2012 - 04:01 AM
I would advise you place another movieclip inside your player character positioned on the last frame of the punch for example and about the size of the fist. Then create a hitTest for that fist movieclip. you can then recreate this for the enemy mc.
#3
Re: Hit test
Posted 06 October 2012 - 07:10 AM
create a global varible make it an int. when you hit the enemy change it to 1, when he hits you change it to 2. When you want to know who hit last check your global value, if its 1 you hit last if its 2 he hit last.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|