# Known Unit Count

Grammar — Get the number of units of type unitType owned by player otherPlayer that have been seen by the specified player player
FlagsNative | Function

Returns the number of units of of the specified unit type owned by another player that have been seen by the specified player.

# Arguments

  • int — Player
  • int — OtherPlayer
  • string [ gamelink::Unit ] — UnitType

Returns — int

native int AIKnownUnitCount(
	int player,
	int testPlayerId,
	string aliasUnitType,
);

Category: AI Advanced / Construction / Functions

# Examples

# mods/core.sc2mod

MeleeHighAI.galaxy

// L453
AIKnownUnitCount(player, c_maxPlayers, c_ZB_RoachWarren)
// L454
AIKnownUnitCount(player, c_maxPlayers, c_ZB_BanelingNest)
// L455
AIKnownUnitCount(player, c_maxPlayers, c_PB_Gateway)
// L456
AIKnownUnitCount(player, c_maxPlayers, c_TB_Barracks)
// L461
AIKnownUnitCount(player, c_maxPlayers, c_PB_Gateway)
// L462
AIKnownUnitCount(player, c_maxPlayers, c_TB_Barracks)
// L467
AIKnownUnitCount(player, c_maxPlayers, c_ZB_SpawningPool)
// L515
AIKnownUnitCount(player, c_maxPlayers, c_TB_Bunker)
// L516
AIKnownUnitCount(player, c_maxPlayers, c_PB_PhotonCannon)
// L517
AIKnownUnitCount(player, c_maxPlayers, c_ZB_SpineCrawler)
// L453
AIKnownUnitCount(player, c_maxPlayers, c_ZB_RoachWarren)
// L454
AIKnownUnitCount(player, c_maxPlayers, c_ZB_BanelingNest)
// L455
AIKnownUnitCount(player, c_maxPlayers, c_PB_Gateway)
// L456
AIKnownUnitCount(player, c_maxPlayers, c_TB_Barracks)
// L461
AIKnownUnitCount(player, c_maxPlayers, c_PB_Gateway)
// L462
AIKnownUnitCount(player, c_maxPlayers, c_TB_Barracks)
// L467
AIKnownUnitCount(player, c_maxPlayers, c_ZB_SpawningPool)
// L515
AIKnownUnitCount(player, c_maxPlayers, c_TB_Bunker)
// L516
AIKnownUnitCount(player, c_maxPlayers, c_PB_PhotonCannon)
// L517
AIKnownUnitCount(player, c_maxPlayers, c_ZB_SpineCrawler)