- Home /
How to get the colliders working?
I've been following Brackey's videos on how to make a tower defense game. I'm trying to make an explosion radius for a missile so that it would take out more than one enemy at a time. But the problem when I set the explosion radius to more than 0, it doesn't work, the enemy doesn't even take damage. I followed Brackey's video carefully, I debugged my code and all I found out was that for some reason it doesn't even enter the foreach loop, so I have no idea what I'm doing wrong. Here is a picture of my code where the problem occurs. I could really use some help here.
Answer by MurphyMurph_21 · Nov 17, 2020 at 07:16 AM
Do your enemies have the "Enemy" tag on them?. Mind sharing more of your code to see what the problem is?
Yes they have an "Enemy" tag. What code do you need to see?
@Eagullfly If i can see the whole script that the Eplode() method is on please
Your answer
Follow this Question
Related Questions
Foreach's char loop not functioning as expected 1 Answer
Multiple Cars not working 1 Answer
Foreach statement issue with UnityEngine.Collider 1 Answer
Distribute terrain in zones 3 Answers