PDA

View Full Version : Enemy Hit Reaction



emilio7
September 6th, 2008, 02:01 PM
Hi everyone, it`s me again, i keep develop a Mortal Kombat fighting game, and i need help here. The thing is i want to make a code that allows me the next: when you hit your enemy, moreover his healthbar decrease, plays a movie clip of the enemy being hit, with blood, for example. But the problem is the movie clip of the hit reaction of the enemy, plays any time that you press for example "Ctrl", the punch button, and i want to make that this happen JUST when you hit the enemy. HOW CAN I MAKE THAT?

Thank you.

peartart
September 6th, 2008, 03:56 PM
Inside of your play code being just inside the punch button listener or whatever, insert an if statement with a hitTest and in that statement add the code to make the movieclip play.

emilio7
September 7th, 2008, 02:44 PM
Sorry, i`m new in ActionScript... codes?