Condition
- Parameters
-
func code
- comment
Returns a new conditionfunc that has the result of evaluating func(). func will receive no arguments and must return a boolean: true/false.
- note
(Old description) Do not destroy conditionfuncs created with
Condition
because this function does not create a new handle (Condition(function foo) == Condition(function foo)
). In the best case it does nothing but in the worst case it affects some internals.- note
1.32.10, Lua:
conditionfunc
extends fromboolexpr
->agent
and must be explicitly destroyed withDestroyBoolExpr
/DestroyCondition
to prevent leaks. However, most functions from blizzard.j destroy passed boolexpr automatically.- pure
- This function is pure. For the same values passed to it, it will always return the same value.
- return type
conditionfunc
- Source code
native Condition takes code func returns conditionfunc
- Source
- boolexpr.j
- wc3modding.com
- Condition