Is there are a easy way to count the number of units in a unit group?
This is a aoe damage trigger i made.
I want to check the number of units that are present in the group before damaging them. And then damage them.
Another side question. Is there a to check unit alliance quickly.
This is a aoe damage trigger i made.
JASS:
set flamecrash = CreateGroup()
call GroupEnumUnitsInRange(flamecrash, x, y, 250, Filter(function TrueBoolexpr))
loop
set tempdmg = FirstOfGroup(flamecrash)
exitwhen tempdmg == null
if (GetPlayerId(GetOwningPlayer(tempdmg)) != cvalue) then
if (GetPlayerId(GetOwningPlayer(tempdmg)) != 15) then
set np = getvalue(tempdmg)
set tempdamage = SpellDamage(cvalue, np, 1, 150)
call UnitDamageTarget( udg_TargetingHero[cvalue], tempdmg, tempdamage, true, false, ATTACK_TYPE_NORMAL , DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
endif
endif
call GroupRemoveUnit(flamecrash, tempdmg)
endloop
call DestroyGroup(flamecrash)
I want to check the number of units that are present in the group before damaging them. And then damage them.
Another side question. Is there a to check unit alliance quickly.