# Enable Stock

Grammar — Enable restocking which has the AI try to make the objects specified by AISetStock for player player
FlagsNative | Action

Instructs the AI to make all the units and buildings specified by previously executed Set Stock commands for a player.

# Arguments

  • int — Player

Returns — void

native void AIEnableStock(int player);

Category: AI Advanced / Construction / Actions

# Examples

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

        }
        if (!AIHasRes(player,200,0)) {
            AIEnableStock(player);
            return true;
        }

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

    // currently expanding see if we need to save minerals
    if (!AIHasRes(player,400,0)) {
        AIEnableStock(player);
        return true;
    }

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

        }
        if (!AIHasRes(player,300,0)) {
            AIEnableStock(player);
            return true;
        }

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

    // currently expanding see if we need to save minerals
    if (!AIHasRes(player,500,0)) {
        AIEnableStock(player);
        return true;
    }

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

        }
        if (!AIHasRes(player,300,0)) {
            AIEnableStock(player);
            return true;
        }

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

    // currently expanding see if we need to save minerals
    if (!AIHasRes(player,500,0)) {
        AIEnableStock(player);
        return true;
    }

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

        }
        if (!AIHasRes(player,300,0)) {
            AIEnableStock(player);
            return true;
        }

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

    // currently expanding see if we need to save minerals
    if (!AIHasRes(player,500,0)) {
        AIEnableStock(player);
        return true;
    }

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

        }
        if (!AIHasRes(player,200,0)) {
            AIEnableStock(player);
            return true;
        }

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

    // currently expanding see if we need to save minerals
    if (!AIHasRes(player,400,0)) {
        AIEnableStock(player);
        return true;
    }

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

        }
        if (!AIHasRes(player,300,0)) {
            AIEnableStock(player);
            return true;
        }

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

    // currently expanding see if we need to save minerals
    if (!AIHasRes(player,500,0)) {
        AIEnableStock(player);
        return true;
    }

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:159

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:218

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:266

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:331

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:398

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:469

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:529

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:578

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:639

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:707

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossEasy.galaxy:252

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossEasy.galaxy:413

    ProtossTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossEasy.galaxy:756

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHard.galaxy:394

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHard.galaxy:624

    ProtossTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHard.galaxy:1052

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:159

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:218

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:266

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:331

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:398

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:469

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:529

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:578

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:639

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:707

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossMdHd.galaxy:359

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossMdHd.galaxy:586

    ProtossTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossMdHd.galaxy:978

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossMedi.galaxy:319

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossMedi.galaxy:498

    ProtossTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossMedi.galaxy:869

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyEy.galaxy:230

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyEy.galaxy:380

    ProtossTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyEy.galaxy:704

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:192

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:251

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:299

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:364

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:431

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:502

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:562

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:611

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:672

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:740

    ProtossHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);
    
    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:144

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:214

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:259

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:330

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:406

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:484

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:545

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:598

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:650

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:717

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranEasy.galaxy:253

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranEasy.galaxy:399

    TerranTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranEasy.galaxy:743

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHard.galaxy:436

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHard.galaxy:702

    TerranTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHard.galaxy:1209

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:144

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:214

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:259

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:330

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:406

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:484

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:545

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:598

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:650

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:717

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranMdHd.galaxy:420

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranMdHd.galaxy:682

    TerranTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranMdHd.galaxy:1151

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranMedi.galaxy:354

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranMedi.galaxy:562

    TerranTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranMedi.galaxy:966

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyEy.galaxy:224

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyEy.galaxy:363

    TerranTechUp(player, c_ldPhaseMid);

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyEy.galaxy:686

    }

    AIEnableStock(player);

    AILDGeneralSharedLogic(player);

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:179

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:249

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:294

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:365

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:441

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:519

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:580

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:633

    TerranHDEmergencyDetectionAntiAir(player);

    AIEnableStock(player);

    //---------------------------------------------------------