HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

EnumDestructablesInCircleBJ

03-06-2006, 04:17 PM#1
emjlr3
try to do this without bjs, here is what I had

Collapse JASS:
function Earth_Toss_Des takes nothing returns nothing
    call KillDestructable(GetEnumDestructable())
endfunction

function
    local location l = blah
    call EnumDestructablesInCircleBJ(100.,l,function Earth_Toss_Des)
endfunction

what I am going to change it to

Collapse JASS:
function Earth_Toss_Des takes nothing returns nothing
    call KillDestructable(GetEnumDestructable())
endfunction

function
    local rect r = Rect(x - 100., y - 100., x + 100., y + 100.)
    call EnumDestructablesInRect(r,[b]???[/b],function Earth_Toss_Des)
endfunction

im confused with the bolded part, it is supposed to be a filter, but say when you use the first one

Collapse JASS:
function EnumDestructablesInCircleBJ takes real radius, location loc, code actionFunc returns nothing
    local rect r

    if (radius >= 0) then
        set bj_enumDestructableCenter = loc
        set bj_enumDestructableRadius = radius
        set r = GetRectFromCircleBJ(loc, radius)
        call EnumDestructablesInRect(r, filterEnumDestructablesInCircleBJ, actionFunc)
        call RemoveRect(r)
    endif
endfunction

it just used "filterEnumDestructablesInCircleBJ" as the filter, what is that, and what should I use, because I have no filter for the destructables
03-06-2006, 04:35 PM#2
Vexorian
BJs are bad when they just call a native, if they actually do something there is no reason to deprecate them
03-06-2006, 04:55 PM#3
emjlr3
i think i figured it out, I jsut set it to null and it seems to be working