# Help with enemies spawning funky and dying in the middle of the screen

**URL:** <https://forum.makecode.com/t/help-with-enemies-spawning-funky-and-dying-in-the-middle-of-the-screen/28714>\
**Category:** Arcade\
**Created:** [May 12, 2024, 12:57am UTC](https://forum.makecode.com/t/help-with-enemies-spawning-funky-and-dying-in-the-middle-of-the-screen/28714 "2024-05-12T00:57:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GabrielDavi](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@GabrielDavi](https://forum.makecode.com/u/GabrielDavi)\
**Post date:** [May 12, 2024, 12:57am UTC](https://forum.makecode.com/t/help-with-enemies-spawning-funky-and-dying-in-the-middle-of-the-screen/28714/1 "2024-05-12T00:57:33Z")

</div>

Hey there! I’m tring to make a game where you can choose between 3 clases (got that to work with a tutorial on youtube) and fight multiple waves of enemies to climb a tower and defeat the boss. But when the enemies spawn they die when they come close to the middle of the screen. I guess there are invisble player sprites there, since I lose lifes, but I can’t get rid of them without breaking the code. And the bat enemies are spawning in the middle and dying right away.

Can someone check my code and help me out? Thanks!

> **[TorreCarmesin](https://arcade.makecode.com/S35760-00112-16046-72020)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [May 12, 2024, 1:20am UTC](https://forum.makecode.com/t/help-with-enemies-spawning-funky-and-dying-in-the-middle-of-the-screen/28714/2 "2024-05-12T01:20:50Z")

</div>

The easiest fix I can think of is turning off sprite collisions for the unused player sprites by getting the “set (mySprite) [auto destroy] ” block and turning it into a “[ghost through sprites] \< on\>” block with the drop down menu.

---

<div class="post-metadata">

**Author:** ![GabrielDavi](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@GabrielDavi](https://forum.makecode.com/u/GabrielDavi)\
**Post date:** [May 12, 2024, 9:45pm UTC](https://forum.makecode.com/t/help-with-enemies-spawning-funky-and-dying-in-the-middle-of-the-screen/28714/3 "2024-05-12T21:45:48Z")

</div>

Thanks, managed to get it working, by first declaring the sprites as empty then only rendering the selected character.
