distancecheck

Retrusn if a unit is within the desired distance for a spell or a given range.

distancecheck(unit, spell[, range]) : Vector3
-- alts
distanceCheck(unit, range) : Vector3

Example

if distancecheck('target', HolyLight) then
return cast(HolyLight, 'target')
end