ironikart
April 4th, 2003, 01:39 AM
I can't seem to get hitTest to work for the plane in my little game. The code I'm using in the plane MC is:
if (_root.player.hitTest("_root.badguy"))
playerhealth -= 20;
}
if (playerhealth<1) {
_root.gotoAndPlay("gameover",1);
}
{
I want to the badguy plane to hit the player's plane and take a subtraction from the player's heath. I've fiddled around with using "this" instead of the full path of the playerMC - no success. My hitTest is working fine for the bullets!
I've attached the fla if you want to have a look at it. It might make more sense than my rather rushed explanation.
if (_root.player.hitTest("_root.badguy"))
playerhealth -= 20;
}
if (playerhealth<1) {
_root.gotoAndPlay("gameover",1);
}
{
I want to the badguy plane to hit the player's plane and take a subtraction from the player's heath. I've fiddled around with using "this" instead of the full path of the playerMC - no success. My hitTest is working fine for the bullets!
I've attached the fla if you want to have a look at it. It might make more sense than my rather rushed explanation.