# Target duplicated mc's

**URL:** <https://forum.kirupa.com/t/target-duplicated-mcs/84869>\
**Category:** Uncategorized\
**Created:** [March 31, 2005, 1:53am UTC](https://forum.kirupa.com/t/target-duplicated-mcs/84869 "2005-03-31T01:53:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjward81](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mjward81](https://forum.kirupa.com/u/mjward81)\
**Post date:** [March 31, 2005, 1:53am UTC](https://forum.kirupa.com/t/target-duplicated-mcs/84869/1 "2005-03-31T01:53:49Z")

</div>

(bare with me only venturing into intermediate AS)

OK! building a spaceship game where you have to blow up enemy fighters. The enemy fighters are duplicated off a mc with the instance name of “enemy1”. The following code is used

```auto
for (i=2; i<=numEnemy; i++) {
L1.enemy1.duplicateMovieClip("enemy"+i, i+10);
}

```

All is working ok, hitTests work great, BUT i want to have it so that each fighter must be hit by lets say 4 bullets before exploding. More realistic.

I read duplicated movieclips dont store variables from their parents, and it has me confused on how to accomplish it. I thought of storing variables on \_root in relation to the max enemy fighters i have at one time, then adding a point on each time a bullet hit the enemy. Once hits 4, explode enemy, and reset variable. But i cant seem to work out how to target the duplicated moveiclip.

Can someone please help, ive been looking at it so long im even starting to confuse myself
