# AISetDefaultArmyUnit

FlagsNative

# Arguments

  • int — player
  • string — unitType

Returns — void

native void AISetDefaultArmyUnit(
	int player,
	string unitType,
);

Category: Unclassified

# Examples

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/Protoss.galaxy:221

    AISetFlag(player, e_flagsEarlyDefScout, false);
    AISetPowerBuilding(player, c_PB_Pylon);
    AISetDefaultArmyUnit(player, c_PU_Zealot);
    AISetDefaultTownHall(player, c_PB_Nexus);
    AITransportSetPanic(player, 0.27); // just below max shield threshold

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/Terran.galaxy:246

    AISetFlag(player, e_flagsEarlyDefScout, false);
    //AITechCountFixupEither(player, c_TB_CommandCenter, c_TB_OrbitalCommand, c_TB_PlanetaryFortress);  // done in BaseAI now
    AISetDefaultArmyUnit(player, c_TU_Marine);
    AISetDefaultTownHall(player, c_TB_CommandCenter);
    AISetNukeConstants(player);

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

    //AITechCountFixupInOrder(player, c_ZB_Hatchery, c_ZB_Lair, c_ZB_Hive);    // done in BaseAI now
    AISetCreepBuilding(player, c_ZB_CreepTumor, "ZergBuildingNotOnCreep");
    AISetDefaultArmyUnit(player, c_ZU_Zergling);
    AISetDefaultTownHall(player, c_ZB_Hatchery);
    AIReqAddSpecialMaker( c_ZB_CreepTumorBurrowed, c_ZB_CreepTumor, "BurrowCreepTumorDown", 0);

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

        AIReqCountAsBuiltObject(lp_player, c_ZU_Larva);
        AISetCreepBuilding(lp_player, c_ZB_CreepTumor, "ZergBuildingNotOnCreep");
        AISetDefaultArmyUnit(lp_player, c_ZU_Zergling);
        AISetDefaultTownHall(lp_player, c_ZB_Hatchery);
        AIReqAddSpecialMaker( c_ZB_CreepTumorBurrowed, c_ZB_CreepTumor, "BurrowCreepTumorDown", 0);

mods/swarm.sc2modbase.sc2data/TriggerLibs/Protoss/Protoss.galaxy:246

    AISetFlag(player, e_flagsEarlyDefScout, false);
    AISetPowerBuilding(player, c_PB_Pylon);
    AISetDefaultArmyUnit(player, c_PU_Zealot);
    AISetDefaultTownHall(player, c_PB_Nexus);
    AITransportSetPanic(player, 0.27); // just below max shield threshold

mods/swarm.sc2modbase.sc2data/TriggerLibs/Terran/Terran.galaxy:252

    AISetFlag(player, e_flagsEarlyDefScout, false);
    //AITechCountFixupEither(player, c_TB_CommandCenter, c_TB_OrbitalCommand, c_TB_PlanetaryFortress);  // done in BaseAI now
    AISetDefaultArmyUnit(player, c_TU_Marine);
    AISetDefaultTownHall(player, c_TB_CommandCenter);
    AISetNukeConstants(player);

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

    //AITechCountFixupInOrder(player, c_ZB_Hatchery, c_ZB_Lair, c_ZB_Hive);    // done in BaseAI now
    AISetCreepBuilding(player, c_ZB_CreepTumor, "ZergBuildingNotOnCreep");
    AISetDefaultArmyUnit(player, c_ZU_Zergling);
    AISetDefaultTownHall(player, c_ZB_Hatchery);
    AIReqAddSpecialMaker( c_ZB_CreepTumorBurrowed, c_ZB_CreepTumor, "BurrowCreepTumorDown", 0);

mods/void.sc2modbase.sc2data/TriggerLibs/Protoss/Protoss.galaxy:255

    AISetFlag(player, e_flagsEarlyDefScout, false);
    AISetPowerBuilding(player, c_PB_Pylon);
    AISetDefaultArmyUnit(player, c_PU_Zealot);
    AISetDefaultTownHall(player, c_PB_Nexus);
    AITransportSetPanic(player, 0.27); // just below max shield threshold

mods/void.sc2modbase.sc2data/TriggerLibs/Terran/Terran.galaxy:258

    AISetFlag(player, e_flagsEarlyDefScout, false);
    //AITechCountFixupEither(player, c_TB_CommandCenter, c_TB_OrbitalCommand, c_TB_PlanetaryFortress);  // done in BaseAI now
    AISetDefaultArmyUnit(player, c_TU_Marine);
    AISetDefaultTownHall(player, c_TB_CommandCenter);
    AISetNukeConstants(player);

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

    //AITechCountFixupInOrder(player, c_ZB_Hatchery, c_ZB_Lair, c_ZB_Hive);    // done in BaseAI now
    AISetCreepBuilding(player, c_ZB_CreepTumor, "ZergBuildingNotOnCreep");
    AISetDefaultArmyUnit(player, c_ZU_Zergling);
    AISetDefaultTownHall(player, c_ZB_Hatchery);
    AIReqAddSpecialMaker( c_ZB_CreepTumorBurrowed, c_ZB_CreepTumor, "BurrowCreepTumorDown", 0);

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/MeleeSC.galaxy:252

    AISetFlag(player, e_flagsEarlyDefScout, false);
    //AITechCountFixupEither(player, c_TB_CommandCenter, c_TB_OrbitalCommand, c_TB_PlanetaryFortress);  // done in BaseAI now
    AISetDefaultArmyUnit(player, c_TU_Marine);
    AISetDefaultTownHall(player, c_TB_CommandCenter);
    AISetNukeConstants(player);

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/Orc/Orc.galaxy:590

    //AISetFlag(player, e_flagsEarlyDefScout, false);
    //AISetPowerBuilding(player, c_PB_Pylon);
    AISetDefaultArmyUnit(player, GRUNT);
    AISetDefaultTownHall(player, GREAT_HALL);
    AITransportSetPanic(player, 0.27); // just below max shield threshold