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:
[AS]if (_root.player.hitTest("_root.badguy"))
playerhealth -= 20;
}
if (playerhealth<1) {
_root.gotoAndPlay(“gameover”,1);
}
{[/AS]
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.
What sucks about scenes is that they suck. Haha, sad but true. To get your scene targetting to actually work right give frame 1 in the scene gameover a frame label. Lets say “gameOver” (no quotes). Then target it with _root.gotoAndPlay(“gameOver”) (use quotes this time)
Thanks for that. I thought theoritically that a new scene should play just the same as the current one. Ah well, it works fine now. Thanks again for your expertise and fast response!
Yeah, TECHNICALLY it shoulda worked, but Flashs support for it’s own Scenes system sucks big time, it’s so buggy it is unbelievably annoying. Mainly playing them is a pain, but as long as you always use frame labels and gotoAndPlay them, it should work, that is the best workaround to playing multiple scenes.