# Get Current Harvest Peon Count

Grammar — Get the number of peons currently harvesting in town town for player player
FlagsNative | Function

Returns the number of peons currently harvesting in a town for a player.

# Arguments

  • int — Player
  • int — Town

Returns — int

native int AIGetCurPeonCount(int player, int town);

Category: AI Advanced / Towns / Functions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeAI.galaxy:78

    
    DebugVarInt2(
        "peons cur",    AIGetCurPeonCount(player, c_townMax),
        "max",          AIGetMaxPeonCount(player, c_townMax)
    );

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/MeleeAI.galaxy:78

    
    DebugVarInt2(
        "peons cur",    AIGetCurPeonCount(player, c_townMax),
        "max",          AIGetMaxPeonCount(player, c_townMax)
    );