IsCorpseInRange
not ratedThis returns whether or not there is a corpse in range.
function IsCorpseInRange takes real range, location origin returns boolean
local group uIr = GetUnitsInRangeOfLocAll(range,origin)
local unit u = null
if (FirstOfGroup(uIr) == null) then
return false
endif
loop
set u = FirstOfGroup(uIr)
exitwhen u == null
if (IsUnitAliveBJ(u) == false) then
return true
endif
call GroupRemoveUnit(uIr,u)
endloop
call DestroyGroup(uIr)
set uIr = null
return false
endfunctionNo comments.