# Game help, shooting falling enemies

**URL:** <https://forum.kirupa.com/t/game-help-shooting-falling-enemies/34879>\
**Category:** Uncategorized\
**Created:** [November 7, 2003, 1:44pm UTC](https://forum.kirupa.com/t/game-help-shooting-falling-enemies/34879 "2003-11-07T13:44:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![macneilslt](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@macneilslt](https://forum.kirupa.com/u/macneilslt)\
**Post date:** [November 7, 2003, 1:44pm UTC](https://forum.kirupa.com/t/game-help-shooting-falling-enemies/34879/1 "2003-11-07T13:44:38Z")

</div>

i have a game, basically missles fall from above and you have to shoot them, over all it works, but there are a few small things i can’t figure out:

1. when you shoot an enemy you get more than one point even though it is only coded to give 1 point.

2. when the enemies hit the ground, they are supposed to explode and subtract 1 life, but they don’t explode right away, and they subtract like 6 lives.

3. they don’t reset fast enough after being killed

4. you can move off of the screen

basic things like that, if anyone has time to look at it, and make suggestions, i would appriciate it greatly,

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 3:03pm UTC](https://forum.kirupa.com/t/game-help-shooting-falling-enemies/34879/2 "2003-11-07T15:03:04Z")

</div>

if(this.hitTest(\_root.ground)) {  
\_root.enemy1.gotoAndPlay(2);  
\_root.lives -= 1;  
}

This bit of code is evaluated every frame. Therefore every frame your missile is in contact with the ground, 1 life will be subtracted.

You need to set a variable to say that this missile has hit and not to subtract any more lives

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2003, 8:22pm UTC](https://forum.kirupa.com/t/game-help-shooting-falling-enemies/34879/3 "2003-11-08T20:22:11Z")

</div>

Nice work Stephen:P
