EnumUnitsSelected
- Parameters
whichPlayer playerenumFilter boolexprenumAction code- comment
For the target player choose all currently selected units that match the filter and run
enumActionon them.- bug
Leaks handle
g: In Jass you must set local variables that hold agents (or any child type) tonullat the end of functions to avoid reference counter leaks.- note
Destroys the
enumFilterboolexprreceived as argument.- patch
1.00
- Source
- Blizzard.j (suggest an edit or discuss on Github)
- return type
nothing- Source code
function EnumUnitsSelected takes player whichPlayer, boolexpr enumFilter, code enumAction returns nothing local group g = CreateGroup() call SyncSelections() call GroupEnumUnitsSelected(g, whichPlayer, enumFilter) call DestroyBoolExpr(enumFilter) call ForGroup(g, enumAction) call DestroyGroup(g) endfunction