Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
BoolExprs are objects that store a function or more and are meant to return a boolean value through these functions. They are used in GroupEnum-functions for example to filter out unwanted units. They are a way of dynamically passing/calling code.
Here is an API for them. And, Not and Or create new boolexprs from other ones and you can also take a look into the children types conditionfunc and filterfunc (which are practically the same). They also have constructors but do not produce a new instance each time, only one per function, so that recycles.
Widget is the parent type of destructable, item and unit, virtually these are interactive objects in the 3d environment with life. There are some functions for them.
I do not get your second question. You want to know what the parameters mean in various functions? Well, I doubt you will find a complete list but most is obvious from name and context, else ask for the specific.
Hmmm.... I have only 1 question, what is boolexpr?? I don't know that.
And I still don't get this, can you explain it a little more detailed? May be add some code example ??
Means you create a condition function that returns a boolean and you call it as a boolexr
JASS:
function ConditionBoolExpr takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD)
// Credits to Adiktuz for remembering me it was GetFilterUnit() instead of GetMatchingUnit()
// Credits to Luorax for clarifying that the function has to be inside a Filter()
endfunction
function Action takes nothing returns nothing
call GroupEnumUnitsInRange(g, radius, x, y, Filter(function ConditionBoolExpr))
endfunction
That would Enum Units in Range that matches that condition (UNIT_TYPE_DEAD) and exclude the others. It's the equivalent to "Pick every unit in region MATCHING CONDITION". That MATCHING CONDITION is the boolexpr function.
You can also set the boolexpr as "null" and exclude the units inside the loop with an if/then/else
<< EDIT >>
Thanks to Adiktuz for the tip. It's "GetFilterUnit()" Here
Thanks to Luorax for clarifying that code can't be turned to boolexpr directly. Here
Means you create a condition function that returns a boolean and you call it as a boolexr
JASS:
function ConditionBoolExpr takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD)
// Credits to Adiktuz for remembering me it was GetFilterUnit() instead of GetMatchingUnit()
endfunction
function Action takes nothing returns nothing
call GroupEnumUnitsInRange(g, radius, x, y, function ConditionBoolExpr)
endfunction
That would Enum Units in Range that matches that condition (UNIT_TYPE_DEAD) and exclude the others. It's the equivalent to "Pick every unit in region MATCHING CONDITION". That MATCHING CONDITION is the boolexpr function.
You can also set the boolexpr as "null" and exclude the units inside the loop with an if/then/else
<< EDIT >>
Thanks to Adiktuz for the tip. It's "GetFilterUnit()"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.