# Count Object As Already Made

Grammar — Instruct the AI requirements code to treat object unit for player player as already made for the purpose of meeting prerequisites
FlagsNative | Action

Instructs the AI requirements code to treat the specified Unit for a player as already made for the purpose of meeting prerequisites,

# Arguments

  • int — Player
  • string<gamelink::Unit> — Unit

Returns — void

native void AIReqCountAsBuiltObject(
	int player,
	string aliasType,
);

Category: AI Advanced / Requirements / Actions

# Examples

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

    AISetDefenseRadii(player, 6.0, 7.0, 9.0);

    AIReqCountAsBuiltObject(player, "Larva");
    AITechCountFixupSingle(player, "Overlord", "Overseer");
    AITechCountFixupSingle(player, "Overlord", "OverlordTransport");

mods/liberty.sc2modbase.sc2data/TriggerLibs/Zerg/Zerg.galaxy:256

    AISetFlag(player, e_flagsEarlyDefScout, false);
    AILimitStockLarva(player, c_ZU_Larva);
    AIReqCountAsBuiltObject(player, c_ZU_Larva);
    //AITechCountFixupSingle(player, c_ZB_Spire, c_ZB_GreaterSpire);           // done in BaseAI now
    //AITechCountFixupInOrder(player, c_ZB_Hatchery, c_ZB_Lair, c_ZB_Hive);    // done in BaseAI now

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:1019

        InitZergCounters(lp_player);
        AILimitStockLarva(lp_player, c_ZU_Larva);
        AIReqCountAsBuiltObject(lp_player, c_ZU_Larva);
        AISetCreepBuilding(lp_player, c_ZB_CreepTumor, "ZergBuildingNotOnCreep");
        AISetDefaultArmyUnit(lp_player, c_ZU_Zergling);

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

    AISetDefenseRadii(player, 6.0, 7.0, 9.0);

    AIReqCountAsBuiltObject(player, "Larva");
    AITechCountFixupSingle(player, "Spire", "GreaterSpire");
    AITechCountFixupInOrder(player, "Hatchery", "Lair", "Hive");

mods/swarm.sc2modbase.sc2data/TriggerLibs/Zerg/Zerg.galaxy:262

    AISetFlag(player, e_flagsEarlyDefScout, false);
    AILimitStockLarva(player, c_ZU_Larva);
    AIReqCountAsBuiltObject(player, c_ZU_Larva);
    //AITechCountFixupSingle(player, c_ZB_Spire, c_ZB_GreaterSpire);           // done in BaseAI now
    //AITechCountFixupInOrder(player, c_ZB_Hatchery, c_ZB_Lair, c_ZB_Hive);    // done in BaseAI now

mods/void.sc2modbase.sc2data/TriggerLibs/Zerg/Zerg.galaxy:268

    AISetFlag(player, e_flagsEarlyDefScout, false);
    AILimitStockLarva(player, c_ZU_Larva);
    AIReqCountAsBuiltObject(player, c_ZU_Larva);
    //AITechCountFixupSingle(player, c_ZB_HydraliskDen, c_ZB_LurkerDen);       // done in BaseAI now
    //AITechCountFixupSingle(player, c_ZB_Spire, c_ZB_GreaterSpire);           // done in BaseAI now