hi im working on a simple filter but for some reason the IsUnitEnemy(unit,player) always returns true. I use this simple filter
that is called up using
and some units in range are enemy units (i checked using player ips) ... the two players atack each other onsight ... so i guess they must be enmies ... and i put the in different forces
any ideas?
JASS:
function DpBoolExp takes nothing returns boolean
local unit u = GetFilterUnit()
local player p =GetFilterPlayer()
local boolean b = IsUnitEnemy(u,p)
set p=null
set u=null
return b
endfunction
that is called up using
JASS:
local boolexpr filter=Condition(function DpBoolExp)
call GroupEnumUnitsInRange(gEff,x1,y1,DAM_RANGE(), filter )
any ideas?