# AIFilterGathering

FlagsNative

# Arguments

  • unitgroup — group
  • int — inResource
  • fixed — distance

Returns — unitgroup

native unitgroup AIFilterGathering(
	unitgroup group,
	int inResource,
	fixed distance,
);

Category: Unclassified

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1024


    //  Find only scv's that are gathering minerals and are close to their mineral target.
    targetGroup = AIFilterGathering(targetGroup, c_resourceTypeMinerals, c_maxDistanceToMinerals);
    scanCount = UnitGroupCount(targetGroup, c_unitCountAll);
    while (scanCount > 0) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:985


    //  Find only scv's that are gathering minerals and are close to their mineral target.
    targetGroup = AIFilterGathering(targetGroup, c_resourceTypeMinerals, c_maxDistanceToMinerals);
    scanCount = UnitGroupCount(targetGroup, c_unitCountAll);
    while (scanCount > 0) {