Thanks for the help! However, checking distance still does not help much. Allow me to explain.
The spell I am working on drags units along with it and does different amounts of damage on impact and during pulling. I use a unit group to determine whether an enemy unit already contacted an missile and is being pulled.
The problem is that sometimes the missile might leave the target behind, and target remains in knockback group. If target remains in group, another missile that comes around won't deal "impact" damage to it.
One solution that I have in mind is latching the target on to the missile. How can I accomplish this?