# AIGetBuildingGroup
Flags —
Native
# Arguments
int
— playerint
— flags
Returns — unitgroup
native unitgroup AIGetBuildingGroup(int player, int flags);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:628
return null;
}
dropOffs = AIGetBuildingGroup(player, c_buildingTypeTownHall);
targetUnit = UnitGroupClosestToPoint(dropOffs, targetPoint);
if (targetUnit == null) {
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1065
}
prodGroup = AIGetBuildingGroup(player, c_buildingTypeProduction | c_buildingTypeActive);
curOrder = UnitOrder(aiUnit, 0);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1162
}
dropOffs = AIGetBuildingGroup(player, c_buildingTypeTownHall);
if (UnitGroupCount(dropOffs, c_unitCountAlive) > 0) {
AICast(aiUnit, ord, c_noMarker, c_castHold);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1197
// if we're idle, head toward closest town center
dropOffs = AIGetBuildingGroup(player, c_buildingTypeTownHall);
bestDropOff = AIGetClosestUnit(aiUnit, dropOffs, true);
if (bestDropOff != c_nullUnit) {
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:607
return null;
}
dropOffs = AIGetBuildingGroup(player, c_buildingTypeTownHall);
targetUnit = UnitGroupClosestToPoint(dropOffs, targetPoint);
if (targetUnit == null) {
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1026
}
prodGroup = AIGetBuildingGroup(player, c_buildingTypeProduction | c_buildingTypeActive);
curOrder = UnitOrder(aiUnit, 0);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1361
}
dropOffs = AIGetBuildingGroup(player, c_buildingTypeTownHall);
if (UnitGroupCount(dropOffs, c_unitCountAlive) > 0) {
AICast(aiUnit, ord, c_noMarker, c_castHold);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1392
// if we're idle, head toward closest town center
dropOffs = AIGetBuildingGroup(player, c_buildingTypeTownHall);
bestDropOff = AIGetClosestUnit(aiUnit, dropOffs, true);
if (bestDropOff != c_nullUnit) {