# AIUnitGroupHasMelee
Flags —
Native
# Arguments
unitgroup
— inGroup
Returns — bool
native bool AIUnitGroupHasMelee(unitgroup inGroup);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:96
friendlyGroup = UnitGroupAlliance(player, c_unitAllianceAlly, RegionCircle(enemyPos, c_forceFieldMeleeRange), filterUnit, c_noMaxCount);
friendlyHasMelee = AIUnitGroupHasMelee(friendlyGroup);
friendlyCount = UnitGroupCount(friendlyGroup, c_unitCountAll);
while (friendlyCount > 0) {
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:97
friendlyGroup = UnitGroupAlliance(player, c_unitAllianceAlly, RegionCircle(enemyPos, c_forceFieldMeleeRange), filterUnit, c_noMaxCount);
friendlyHasMelee = AIUnitGroupHasMelee(friendlyGroup);
friendlyCount = UnitGroupCount(friendlyGroup, c_unitCountAll);
while (friendlyCount > 0) {