# AIGetNumEnemies

FlagsNative

# Arguments

  • int — player

Returns — int

native int AIGetNumEnemies(int player);

Category: Unclassified

# Examples

mods/core.sc2modbase.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.sc2modbase.sc2data/TriggerLibs/MeleeHighAI.galaxy:448


    //logic limited to only 1v1 games
    if (AIGetNumEnemies(player) > 1) {
        return false;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeHighAI.galaxy:511


    //logic limited to only 1v1 games
    if (AIGetNumEnemies(player) > 1) {
        return false;
    }

mods/void.sc2modbase.sc2data/TriggerLibs/MeleeHighAI.galaxy:448


    //logic limited to only 1v1 games
    if (AIGetNumEnemies(player) > 1) {
        return false;
    }

mods/void.sc2modbase.sc2data/TriggerLibs/MeleeHighAI.galaxy:511


    //logic limited to only 1v1 games
    if (AIGetNumEnemies(player) > 1) {
        return false;
    }