Warcraft III resources & community, 2003–2006 · archived

IsCorpseInRange

not rated
Submitted by AltSubmitterFunctions0 downloads
This returns whether or not there is a corpse in range.

Source

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
endfunction

Comments

0

No comments.