Technomancer
New Member
- Reaction score
- 14
Ok so here's the function in question:
I copied it and modified it from a dummy GUI script I put together (to get the JASS code) but I need to apply it to a general function that doesn't have a triggering unit. How do I pass what unit I want to compare, or grab that unit from the following function? ( GetUnitsInRectMatchin( ... ) )
Here's the call to the function:
I have no unit to pass as of the call because they need to be assigned to a group.
So basically what I want to do is select all units of one type and can't figure out how to do it in GUI or JASS (JASS preferred) because I can't figure out how to grab the unit being checked in the checking function.
Code:
function UnitTypeEquals takes unit un, unittype utype returns boolean
return GetUnitTypeID(un) == utype
endfunction
I copied it and modified it from a dummy GUI script I put together (to get the JASS code) but I need to apply it to a general function that doesn't have a triggering unit. How do I pass what unit I want to compare, or grab that unit from the following function? ( GetUnitsInRectMatchin( ... ) )
Here's the call to the function:
Code:
set g = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function UnitTypeEquals('h003'))
I have no unit to pass as of the call because they need to be assigned to a group.
So basically what I want to do is select all units of one type and can't figure out how to do it in GUI or JASS (JASS preferred) because I can't figure out how to grab the unit being checked in the checking function.