# Help with my game

**URL:** <https://forum.kirupa.com/t/help-with-my-game/198703>\
**Category:** Uncategorized\
**Created:** [August 28, 2006, 1:07am UTC](https://forum.kirupa.com/t/help-with-my-game/198703 "2006-08-28T01:07:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuffocateMyMind](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@SuffocateMyMind](https://forum.kirupa.com/u/SuffocateMyMind)\
**Post date:** [August 28, 2006, 1:07am UTC](https://forum.kirupa.com/t/help-with-my-game/198703/1 "2006-08-28T01:07:23Z")

</div>

Hi, i’m kind of new to flash and I started creating a game and i’ve gotten to the point where my game can: shoot, move char., kill enemy and add to score, once lives = 0 then game over, and multiple enemies that shoot.

Ok, my problem now is that i’m trying to get it so that once my score is over a certain amount then increase the number of enemies, and i’m using this code now to control how many enemies are on the screen at once:

```auto
}
var numEnemy = 2;
function Enemys() {
    for (j=2; j<=numEnemy; j++) {
    var name = "enemy"+j;
    _root.enemy1.duplicateMovieClip(name, j);
}

```

I can change ‘numEnemy =’ to any number and thats how many enemies will be on the screen at once. Then I used this code to increase that number once my score was over 250:

```auto
}
if (_root.score >= 250) {
    numEnemy = 3;

```

but for some reason this just doesn’t work… Can anyone tell me why or link me to a tutorial on how to create levels in a game?

Thanks.
