No need for Validation

Why not just use the OnTakeDamage within the DronePawn??

You can just set the Damage Causer as the Move To.
This way it stays within the DronePawn, so that when it is hit, it will always go to the correct dmg Causer.
Also, you don’t get any error message, thus no need for validation.
So much easier in my opinion.

You should still do an IsValid check, however unlikely.

What if the damage causer dies and gets destroyed?

In that case, the enemy keeps going to the last known damage causer, and hover at that position, or hover and continue its old path, if you set it that way.
In my opinion a “dumb” drone goes towards where the damage came from, hovers to check for threats (overlap) and then either stay there and be “dumb” or be just a little smarter and continue its previous path before the attack.

Tho this course does not go into that much detail, so none of that is actually relevant here anyways XD

Privacy & Terms