# AIGetNumEnemies
Flags —
Native
# Arguments
int
— player
Returns — int
native int AIGetNumEnemies(int player);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeBuildAI.galaxy:386
}
if (AIGetTotalStartLocs() > AIGetNumEnemies(player)+AIGetNumAllies(player)+1) { // ie numStartLocs > numPlayers
// don't rush if we can't be sure of the opponent's start location, just do a timing attack instead
timingChance += rushChance;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:448
//logic limited to only 1v1 games
if (AIGetNumEnemies(player) > 1) {
return false;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:511
//logic limited to only 1v1 games
if (AIGetNumEnemies(player) > 1) {
return false;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:448
//logic limited to only 1v1 games
if (AIGetNumEnemies(player) > 1) {
return false;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:511
//logic limited to only 1v1 games
if (AIGetNumEnemies(player) > 1) {
return false;
}