# Init Campaign Harvesting

Grammar — Initialize campaign harvesting for player player
FlagsNative | Action

Initializes harvesting for an AI player. This happens automatically when you call one of the Start Campaign AI actions.

# Arguments

  • int — Player

Returns — void

native void AIInitCampaignHarvest(int player);

Category: AI / MiscCampaign / Actions

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:784

    }

    AIInitCampaignHarvest(gv_pLAYER02_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER03_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER04_PROTOSS);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:785


    AIInitCampaignHarvest(gv_pLAYER02_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER03_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER04_PROTOSS);
    return true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:786

    AIInitCampaignHarvest(gv_pLAYER02_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER03_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER04_PROTOSS);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:846

    UnitBehaviorAddPlayer(UnitFromId(289), "ColonyInfestation", gv_p02_ZERG_LOW_GROUND_AI, 1);
    UnitBehaviorAddPlayer(UnitFromId(290), "ColonyInfestation", gv_p02_ZERG_LOW_GROUND_AI, 1);
    AIInitCampaignHarvest(gv_p02_ZERG_LOW_GROUND_AI);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2mapMapScript.galaxy:784

    }

    AIInitCampaignHarvest(gv_pLAYER02_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER03_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER04_PROTOSS);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2mapMapScript.galaxy:785


    AIInitCampaignHarvest(gv_pLAYER02_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER03_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER04_PROTOSS);
    return true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2mapMapScript.galaxy:786

    AIInitCampaignHarvest(gv_pLAYER02_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER03_PROTOSS);
    AIInitCampaignHarvest(gv_pLAYER04_PROTOSS);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul03.sc2mapMapScript.galaxy:846

    UnitBehaviorAddPlayer(UnitFromId(289), "ColonyInfestation", gv_p02_ZERG_LOW_GROUND_AI, 1);
    UnitBehaviorAddPlayer(UnitFromId(290), "ColonyInfestation", gv_p02_ZERG_LOW_GROUND_AI, 1);
    AIInitCampaignHarvest(gv_p02_ZERG_LOW_GROUND_AI);
    return true;
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zhybrid02.sc2map/MapScript.galaxy:4004

        Wait(1.0, c_timeAI);
    }
    AIInitCampaignHarvest(gv_p03_DOMINION_YELLOW);
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid02.sc2mapMapScript.galaxy:4004

        Wait(1.0, c_timeAI);
    }
    AIInitCampaignHarvest(gv_p03_DOMINION_YELLOW);
    return true;
}

mods/core.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:249

    AIInitCampaignTowns(player);
    
    AIInitCampaignHarvest(player);
    AIHarvestRate(player, 1);
    AISetNumScouts(player, 0);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:292

    AIInitCampaignTowns(player);
    
    AIInitCampaignHarvest(player);
    AIHarvestRate(player, 1);
    AISetNumScouts(player, 0);