hitTest on multiple objects (duplicated movie clips)

i’m making a game, have duplicated movie clips as bullets, i want to know how i can make my enemy die if it is hit by any of the duplicated movie clips
i have tried numerous things
[AS]onClipEvent (enterFrame) {
if (_parent.hitTest (root.bullet1)) {
_parent.gotoAndStop(3)
}
}[/AS]
is generally what i want, but i want the “bullet1” to include everything from bullet1-bullet99999999999
is there anything that can act as a wildcard or something
any help would be appreciated
thanks :slight_smile:

This situation would seem a little two sided:

  1. because on one hand you don’t want each bullet to have a hitTest on the bad guy; that would slow your movie down a lot after a while and

  2. on the other hand, you don’t want the badguy to have a loop that tests to see if any of the bullets has hit him.

So what you can use is situation (1). You’ll need to think a little though. When a bullet is shot, you create the instance right? Attach an action to each bullet that is fired to hitTest the badguy. BUT!!! also add an action that deletes the bullet once it goes off screen (what’s the use of drawing something you can’t see) or hits the guy. That way, you can only have a few bullets drawn on screen and also be able to test to see if it hit anything.

right, i have them disappearing, but what i am going to have several badguys as well, so i can’t have the bullets hitTest them all. What i need is an as that would add a number to the end in the hitTest, which should work, because they r numbered numerically. Maybe an array or something?