RandomDestructableInRectBJ

Parameters
rrect
filterboolexpr
comment
note

Destroys the filter boolexpr received as argument.

patch

1.00

Source
Blizzard.j (raise an issue to discuss on Github or submit a PR)
return type
destructable
Source code
function RandomDestructableInRectBJ takes rect r, boolexpr filter returns destructable
    set bj_destRandomConsidered = 0
    set bj_destRandomCurrentPick = null
    call EnumDestructablesInRect(r, filter, function RandomDestructableInRectBJEnum)
    call DestroyBoolExpr(filter)
    return bj_destRandomCurrentPick
endfunction