I have icicles fall from the sky and land randomly on the floor. I want to have an event check if any of the shadows, spawned under the icicles before they fall (showing the player where to not stand), are overlapping, then destroy the shadows and corresponding icicles to those shadows.
Currently it will kill the correct shadows but the icicles will get destroyed, more than they are suppose to.
I tried only having the shadows overlapping as the only condition but still if any shadows are overlapping all the icicles get destroyed, not just the icicles that have shadows overlapping.
Here is my algorithm. What am I doing wrong?
I think it doesn't get the icicle number right since they are all of the same object and have different id numbers.
I was hoping for it to check after each shadow spawned and then destroy the objects then before the next shadow spawned but i think it spawns all the shadows and objects then checks for overlap and cant figure out which icicle to kill....
Any Help will be greatly appreciated thank you. I am still very new to designing games and get lost easy.