# Build

Grammar — Build count|Number units of type unitType|Building in player player’s town town with priority priority using build flags flags|Build Flags
FlagsNative | Action

Instructs the AI to build some buildings of the specified type.

# Arguments

  • int — Player
  • int — Priority
  • int — Town
  • string<gamelink::Unit> — Unit Type
  • int — Count
  • int — Flags

Returns — void

native void AIBuild(
	int player,
	int priority,
	int town,
	string aliasUnitType,
	int count,
	int flags,
);

Category: AI Advanced / Construction / Actions

# Examples

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

    int count=qty-has;
    if(count>0){
        AIBuild(player,c_makePriorityTown,townid,unitid,count,c_nearChokePoint);
    }
}