- Joined
- Nov 22, 2006
- Messages
- 1,260
I wanted to create a boolexpr that filters all enemies of owner of caster, but i'm not sure how to do that, how to transfer unit to that function? Or do I have to use handles?
example:
How do I do this?
example:
JASS:
function TargetCondition takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(<caster>??)
endfunction
function Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local boolexpr b = Condition(function TargetCondition)
local group g = CreateGroup()
call GroupEnumUnitsInRange(g, GetUnitX(c), GetUnitY(c), 500, b)
....
....
....
endfunction
How do I do this?