Attackers seen as one attacker and all die at same time

If I have four lizards chewing on a defender and destroys that it, for example, the four lizards are seen as one. Then when adding a defender, like a cactus, two zucchini’s kills all four (or whatever amount of attackers). Shouldn’t it take two zucchini’s per lizard. Perhaps this is dealt with later in the course?

Hi,

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

If all attackers die, maybe your code calls FindObjectOfType instead of GetComponent. That’s just a guess, though.

My code is as taught. Rick has the same problem as well as anyone else who coded as Rick has shown us.

If Rick has the same problem as you, please keep watching. He’ll very likely fix it in one of the next video. If he doesn’t or if the problem persists in your project, please share more information on what you did and have.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms