# Enemies Shooting After They Die

**URL:** <https://forum.makecode.com/t/enemies-shooting-after-they-die/8272>\
**Category:** Help\
**Created:** [May 24, 2021, 7:14am UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272 "2021-05-24T07:14:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hellothere](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@hellothere](https://forum.makecode.com/u/hellothere)\
**Post date:** [May 24, 2021, 7:14am UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/1 "2021-05-24T07:14:27Z")

</div>

Hi,  
I am making a galaga rip off game but when i kill my enemies their projectiles keep shooting even though they are dead and no longer in the game.

---

<div class="post-metadata">

**Author:** ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)\
**Post date:** [May 24, 2021, 4:37pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/2 "2021-05-24T16:37:58Z")

</div>

Share your code and we can take a look 🙂

---

<div class="post-metadata">

**Author:** ![HewwoBug](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hewwobug/32/3995_2.png) [@HewwoBug](https://forum.makecode.com/u/HewwoBug)\
**Post date:** [May 24, 2021, 4:38pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/3 "2021-05-24T16:38:10Z")

</div>

Can you please show your game? I can only give suggestions when I see your program.

---

<div class="post-metadata">

**Author:** ![LaserFoxPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/laserfoxpro/32/4105_2.png) [@LaserFoxPro](https://forum.makecode.com/u/LaserFoxPro)\
**Post date:** [May 24, 2021, 11:00pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/4 "2021-05-24T23:00:15Z")

</div>

use the `destroy mysprite` block

---

<div class="post-metadata">

**Author:** ![hellothere](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@hellothere](https://forum.makecode.com/u/hellothere)\
**Post date:** [May 24, 2021, 11:39pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/5 "2021-05-24T23:39:36Z")

</div>

Here it is [https://makecode.com/\_LLeMMsaqVPp8](https://makecode.com/_LLeMMsaqVPp8)

---

<div class="post-metadata">

**Author:** ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)\
**Post date:** [May 25, 2021, 11:07pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/6 "2021-05-25T23:07:49Z")

</div>

Have a look at this version I’ve whipped up for you

> **[Galaga Likness 2](https://arcade.makecode.com/57100-62828-98048-54555)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [May 25, 2021, 11:09pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/7 "2021-05-25T23:09:37Z")

</div>

Nice, @WoodysWorkshop! Make sure you also set the “destroy on wall” flag so that the projectiles don’t stick to the top of the screen:

 ![Screen Shot 2021-05-25 at 4.08.46 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/bf97934ff69354e2c85c447eef20c7e4df8f0956.png)

---

<div class="post-metadata">

**Author:** ![hellothere](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@hellothere](https://forum.makecode.com/u/hellothere)\
**Post date:** [May 26, 2021, 12:29am UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/8 "2021-05-26T00:29:30Z")

</div>

Thankyou,  
this has helped a lot 🙂

---

<div class="post-metadata">

**Author:** ![HewwoBug](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hewwobug/32/3995_2.png) [@HewwoBug](https://forum.makecode.com/u/HewwoBug)\
**Post date:** [May 26, 2021, 9:10pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/9 "2021-05-26T21:10:34Z")

</div>

Wait, why can’t I see the a lot of the code?

---

<div class="post-metadata">

**Author:** ![Drojal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/drojal/32/7377_2.png) [@Drojal](https://forum.makecode.com/u/Drojal)\
**Post date:** [December 21, 2022, 6:07pm UTC](https://forum.makecode.com/t/enemies-shooting-after-they-die/8272/10 "2022-12-21T18:07:31Z")

</div>

Hello! I try to make my enemies to stop shooting, but the command “auto-destroy” doesn’t work at all. Is there any mistake that I am doing or is there any other way to do it?
