# Help with Issue of Spawning Item After Collision

**URL:** <https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181>\
**Category:** Help\
**Tags:** game\
**Created:** [January 16, 2025, 8:12pm UTC](https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181 "2025-01-16T20:12:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keggruel](https://avatars.discourse-cdn.com/v4/letter/k/9dc877/32.png) [@Keggruel](https://forum.makecode.com/u/Keggruel)\
**Post date:** [January 16, 2025, 8:12pm UTC](https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181/1 "2025-01-16T20:12:44Z")

</div>

I am working on a game where you collect coins while avoiding projectiles. But the issue is, things will continue to spawn randomly around the map as long as I don’t overlap with it. The moment I overlap with it, it stops the Spawning.

The goal is to collect a coin and destroy it which makes your points go up by one, and then for another coin to spawn somewhere else on screen for you to collect. This is meant to repeat until they hit 50 points,

---

<div class="post-metadata">

**Author:** ![Mr\_Duck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mr_duck/32/13442_2.png) [@Mr\_Duck](https://forum.makecode.com/u/Mr_Duck)\
**Post date:** [January 16, 2025, 10:02pm UTC](https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181/2 "2025-01-16T22:02:04Z")

</div>

@Keggruel do you mind sharing your game? (I might be able to help)

---

<div class="post-metadata">

**Author:** ![Keggruel](https://avatars.discourse-cdn.com/v4/letter/k/9dc877/32.png) [@Keggruel](https://forum.makecode.com/u/Keggruel)\
**Post date:** [January 17, 2025, 6:30pm UTC](https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181/3 "2025-01-17T18:30:35Z")

</div>

> **[Challenge](https://arcade.makecode.com/32752-99717-69304-17596)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I am working with a student to try to fix it, so if you do figure out where I went wrong please let me know so I can learn! Thank you lol

---

<div class="post-metadata">

**Author:** ![Mr\_Duck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mr_duck/32/13442_2.png) [@Mr\_Duck](https://forum.makecode.com/u/Mr_Duck)\
**Post date:** [January 17, 2025, 7:11pm UTC](https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181/4 "2025-01-17T19:11:13Z")

</div>

(you can change the sise of your screen by going in JavaScript chandging these numbers)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/9/690b03b6619204a2ca01f9285bda68d6c96e448e.png)

---

<div class="post-metadata">

**Author:** ![Mr\_Duck](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mr_duck/32/13442_2.png) [@Mr\_Duck](https://forum.makecode.com/u/Mr_Duck)\
**Post date:** [January 17, 2025, 7:25pm UTC](https://forum.makecode.com/t/help-with-issue-of-spawning-item-after-collision/33181/5 "2025-01-17T19:25:04Z")

</div>

@Keggruel your problem was that you were destroying the coin I changed it and made it leave the map and go back in the map (I also made your map smaller so the coin won’t go outside the screen(I also had to changed the screen size)) I also added 2 extentions That personally I find very useful

> **[Challenge](https://arcade.makecode.com/S20456-36407-72654-38702)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I really like your game btw good luck! 😁
