# Multiple enemies (AS2)

**URL:** https://forum.kirupa.com/t/multiple-enemies-as2/310043
**Category:** Uncategorized
**Created:** [May 31, 2010, 10:08am UTC](https://forum.kirupa.com/t/multiple-enemies-as2/310043 "2010-05-31T10:08:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DragoonZ50](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@DragoonZ50](https://forum.kirupa.com/u/DragoonZ50)
#### Post date: [May 31, 2010, 10:08am UTC](https://forum.kirupa.com/t/multiple-enemies-as2/310043/1 "2010-05-31T10:08:31Z")

</div>

hi. Right now im on my last day of working on this school project before its due. I’ve tried a few things already and can’t get it working; although I know the concept, I cant program this correctly.

What i’m trying to do is import movieclip “enemy” from the library to the screen. I have already programmed its movement in my actions layer with

```auto
enemy._y = enemy._y - enemyspeed

```

so that the enemy moves up on your screen as you try to avoid it. I have seen a way of inputting multiple enemies on the screen at one time;  
it dealt with using variable i, which in this case would be equal from 1 to 5 (allowing only 5 enemies to be on the screen at one given time), and giving each enemy the next value of i until they reset.

if someone could help me write this out it would be great help, thank you
