Interaction problem

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.

1 Like

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.