# Interaction problem

**URL:** <https://forum.makecode.com/t/interaction-problem/36460>\
**Category:** Help\
**Created:** [May 7, 2025, 6:53pm UTC](https://forum.makecode.com/t/interaction-problem/36460 "2025-05-07T18:53:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danihiro](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@Danihiro](https://forum.makecode.com/u/Danihiro)\
**Post date:** [May 7, 2025, 6:53pm UTC](https://forum.makecode.com/t/interaction-problem/36460/1 "2025-05-07T18:53:40Z")

</div>

Hi, I would like to ask for some help in this project I am doing. Basically for some reason the if statements break the programing when i use them to try to check certain interactions, specifically for projectiles and food, if someone has any idea I would be very grateful.

> **[Project 9.5](https://arcade.makecode.com/S64444-34606-51983-84807)**
>
> 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 8, 2025, 5:25pm UTC](https://forum.makecode.com/t/interaction-problem/36460/2 "2025-05-08T17:25:24Z")

</div>

I think your issue is that you can’t check if two sprites are overlapping if one of those sprites doesn’t actually exist, so when you check for all those sprite overlaps, you get an error because some of them don’t exist. What I would do is either make separate sprite types for each kind of thing, or use the Sprite Data extension to give each thing a sort of name/property (like which power up it contains) and then you can do a certain thing based on the sprite data attribute of the overlapped sprite.
