This seems like a perfect opportunity to use the CombatTarget.cs

Filtering seems like an ideal opportunity to use the CombatTarget.cs that we created way back in the Combat course. I utilized this by creating a serializable bool with a public getter, named IsFriendly…
my filter can now check if an enemy is friendly or not. And since all of the enemies have this component on their variant, its wasy access, and I can also utilize that variant for NPC’s, or non aggressive enemies. Just a thought… :slight_smile:

4 Likes

It’s a good optimization. Well done.

That’s super obvious. I think some neurons started firing when he implemented it the way he does in this but they didn’t grab hold of this like you did :rofl: Nice work.

However, I will say this. I don’t think I’ll end up implementing CombatTarget for my project like we did for the RPG course. So tags probably do work better for me. But in the context of this course, for sure CT.cs is the way to go <3

Privacy & Terms