Okay, I'm thinking to start using a boolexpr for 1 of my systems.
However, I have a question.
After seeing this:
I started wondering what happens here. More specificly with the boolexpr.
If I do something like this:
Will this be usable only once since the boolexpr is destroyed or will I be able to use it as many times as I want to? And if it's the latter - why?? Isn't the boolexpr getting destroyed? Or perhaps only a "link" to the boolexpr is getting destroyed?
However, I have a question.
After seeing this:
JASS:
function GetUnitsInRangeOfLocMatching takes real radius, location whichLocation, boolexpr filter returns group
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, whichLocation, radius, filter)
call DestroyBoolExpr(filter)
return g
endfunction
If I do something like this:
JASS:
function FilterFunc takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), udg_FilterPlayer)
endfunction
function test takes nothing returns nothing
set udg_FilterPlayer = GetTriggerPlayer()
set udg_TempGroup = GetUnitsInRangeOfLocMatching(1000.00, udg_TestPoint, Condition(function FilterFunc))
call ForGroup(//.....
Will this be usable only once since the boolexpr is destroyed or will I be able to use it as many times as I want to? And if it's the latter - why?? Isn't the boolexpr getting destroyed? Or perhaps only a "link" to the boolexpr is getting destroyed?