the hero who casts the spell is still picked for some reason
(am not good at conditions)
also can someone help so it doesn't pick buildings as well
(am not good at conditions)
also can someone help so it doesn't pick buildings as well
JASS:
function Trig_Swarm_Condition takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetTriggerUnit())) )
endfunction
//below is the just part with the problem
set swarm = GetSpellTargetLoc()
set dead = GetUnitsInRangeOfLocMatching(300.00, swarm, Condition(function Trig_Swarm_Condition ))