# AIGetNumWorkers

FlagsNative

# Arguments

  • int — player

Returns — int

native int AIGetNumWorkers(int player);

Category: Unclassified

# Examples

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

bool AIShouldScoutDueToBeaconOrAlly (int player) {
    if (PlayerBeaconIsSet(player, c_beaconScout)) {
        if (AIGetNumWorkers(player) >= 6) {
            if (PlayerBeaconIsSet(player, c_beaconScout)) {
                return true;

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeLowAI.galaxy:144


    //scouting logic
    if (AIGetNumWorkers(player) >= 6) {
        if (PlayerBeaconIsSet(player, c_beaconScout)) {
            AISetFlag(player, e_flagsScouting, true);

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

bool AIShouldScoutDueToBeaconOrAlly (int player) {
    if (PlayerBeaconIsSet(player, c_beaconScout)) {
        if (AIGetNumWorkers(player) >= 6) {
            if (PlayerBeaconIsSet(player, c_beaconScout)) {
                return true;