# Set StockUnitNext
Grammar — Increment stock count for unit type unitType by count for player player with ignore if queued set to ignoreIfQueued|Ignor If Queued
Flags —Native
|Action
Increments the stock count for the specified unit type by one if the Count parameter is set to 0, or the number of those units that are in progress or better is less than the specified Count. Does nothing if the Ignore If Queued parameter is set to true and the number of queued and in progress units of the specified type is greater than 0.
# Arguments
int
— Playerint
— Countstring
[ gamelink::Unit ] — Unit Typebool
— Ignore If Queued
Returns — void
native void AISetStockUnitNext(
int player,
int count,
string aliasUnitType,
bool when,
);
# Related
Category: AI Advanced / Construction / Actions
- [F] —
void
— Build — ( AIBuild ) - [F] —
void
— Train — ( AITrain ) - [F] —
void
— Research — ( AIResearch ) - [F] —
void
— Make Always — ( AIMakeAlways ) - [F] —
void
— Make Once — ( AIMakeOnce ) - [F] —
void
— Clear Build Queue — ( AIClearBuildQueue ) - [F] —
void
— Clear Train Queue — ( AIClearTrainQueue ) - [F] —
void
— Clear Research Queue — ( AIClearResearchQueue ) - [F] —
void
— Clear Stock — ( AIClearStock ) - [F] —
void
— Enable Stock — ( AIEnableStock ) - [F] —
void
— Set StockEx — ( AISetStockEx ) - [F] —
void
— Set Stock — ( AISetStock ) - [F] —
void
— Set StockOpt — ( AISetStockOpt ) - [F] —
void
— Set StockUnitNext — ( AISetStockUnitNext ) - [F] —
bool
— Set StockTown — ( AISetStockTown ) - [F] —
bool
— Set StockExpand — ( AISetStockExpand ) - [F] —
void
— Set StockAlias — ( AISetStockAlias ) - [F] —
void
— Set StockFree — ( AISetStockFree ) - [F] —
void
— Default Economy — ( AIDefaultEconomy ) - [F] —
void
— Default Expansion — ( AIDefaultExpansion )
# Examples
# mods/core.sc2mod
// L113
AISetStockUnitNext( player, countTotal, what, when )
// L118
AISetStockUnitNext( player, countTotal, what, when )
# mods/core.sc2mod
// L389
AISetStockUnitNext( player, count, worker, c_stockAlways )
// L636
AISetStockUnitNext( player, numTowns+1, c_ZU_Queen, c_stockAlways )
# mods/liberty.sc2mod
// L2087
AISetStockUnitNext( player, minPylonCount, c_PB_Pylon, c_stockAlways )
// L2159
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L2171
AISetStockUnitNext( player, 2, c_PU_Observer, c_stockAlways )
// L2178
AISetStockUnitNext( player, 3, c_PU_Observer, c_stockAlways )
// L2179
AISetStockUnitNext( player, 3, c_PU_WarpPrism, c_stockAlways )
// L2185
AISetStockUnitNext( player, 6, c_PB_Gateway, c_stockIdle )
// L2186
AISetStockUnitNext( player, 1, c_PB_TwilightCouncil, c_stockIdle )
// L2187
AISetStockUnitNext( player, 3, c_PB_RoboticsFacility, c_stockIdle )
// L2188
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L2192
AISetStockUnitNext( player, 3, c_PB_Forge, c_stockAlways )
# mods/liberty.sc2mod
// L210
AISetStockUnitNext( player, 22, c_PU_Probe, c_stockIdle )
// L225
AISetStockUnitNext( player, 22, c_PU_Probe, c_stockIdle )
// L708
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L709
AISetStockUnitNext( player, 1, c_PB_RoboticsFacility, c_stockIdle )
// L710
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L714
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L715
AISetStockUnitNext( player, 1, c_PB_RoboticsFacility, c_stockIdle )
// L716
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L720
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L721
AISetStockUnitNext( player, 1, c_PB_RoboticsFacility, c_stockIdle )
# mods/liberty.sc2mod
// L292
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L310
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L329
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L349
AISetStockUnitNext( player, 30, c_PU_Probe, c_stockIdle )
// L367
AISetStockUnitNext( player, 30, c_PU_Probe, c_stockIdle )
// L586
AISetStockUnitNext( player, 2, c_PB_Gateway, c_stockIdle )
// L590
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L595
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L600
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L604
AISetStockUnitNext( player, 3, c_PB_Stargate, c_stockIdle )
# mods/liberty.sc2mod
// L2086
AISetStockUnitNext( player, minPylonCount, c_PB_Pylon, c_stockAlways )
// L2152
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L2167
AISetStockUnitNext( player, 2, c_PU_Observer, c_stockAlways )
// L2174
AISetStockUnitNext( player, 3, c_PU_Observer, c_stockAlways )
// L2175
AISetStockUnitNext( player, 2, c_PU_WarpPrism, c_stockAlways )
// L2181
AISetStockUnitNext( player, 6, c_PB_Gateway, c_stockIdle )
// L2182
AISetStockUnitNext( player, 1, c_PB_TwilightCouncil, c_stockIdle )
// L2183
AISetStockUnitNext( player, 3, c_PB_RoboticsFacility, c_stockIdle )
// L2184
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L2188
AISetStockUnitNext( player, 3, c_PB_Forge, c_stockAlways )
# mods/liberty.sc2mod
// L865
AISetStockUnitNext( player, 2, c_PB_Forge, c_stockAlways )
// L888
AISetStockUnitNext( player, 2, c_PB_Forge, c_stockAlways )
// L947
AISetStockUnitNext( player, 4, c_PB_Gateway, c_stockIdle )
// L951
AISetStockUnitNext( player, 3, c_PB_RoboticsFacility, c_stockIdle )
// L954
AISetStockUnitNext( player, 3, c_PB_Stargate, c_stockIdle )
// L1198
AISetStockUnitNext( player, 2, c_PU_Zealot, c_stockAlways )
// L1199
AISetStockUnitNext( player, 2, c_PU_Stalker, c_stockAlways )
// L1200
AISetStockUnitNext( player, 2, c_PB_Gateway, c_stockIdle )
// L1205
AISetStockUnitNext( player, 4, c_PU_Stalker, c_stockAlways )
// L1206
AISetStockUnitNext( player, 1, c_PU_Sentry, c_stockAlways )
# mods/liberty.sc2mod
// L257
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L275
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L294
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L314
AISetStockUnitNext( player, 26, c_PU_Probe, c_stockIdle )
// L332
AISetStockUnitNext( player, 26, c_PU_Probe, c_stockIdle )
// L548
AISetStockUnitNext( player, 2, c_PB_Gateway, c_stockIdle )
// L552
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L557
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L562
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L566
AISetStockUnitNext( player, 3, c_PB_Stargate, c_stockIdle )
# mods/liberty.sc2mod
// L274
AISetStockUnitNext( player, 24, c_PU_Probe, c_stockIdle )
// L292
AISetStockUnitNext( player, 24, c_PU_Probe, c_stockIdle )
// L464
AISetStockUnitNext( player, 2, c_PB_Gateway, c_stockIdle )
// L469
AISetStockUnitNext( player, 2, c_PB_Gateway, c_stockIdle )
// L474
AISetStockUnitNext( player, 2, c_PB_Gateway, c_stockIdle )
// L478
AISetStockUnitNext( player, 2, c_PB_Stargate, c_stockIdle )
// L820
AISetStockUnitNext( player, 4, c_PB_Gateway, c_stockIdle )
// L821
AISetStockUnitNext( player, 2, c_PB_RoboticsFacility, c_stockIdle )
// L822
AISetStockUnitNext( player, 2, c_PB_Stargate, c_stockIdle )
// L826
AISetStockUnitNext( player, 4, c_PB_Gateway, c_stockIdle )
# mods/liberty.sc2mod
// L189
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L203
AISetStockUnitNext( player, 20, c_PU_Probe, c_stockIdle )
// L656
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L657
AISetStockUnitNext( player, 1, c_PB_RoboticsFacility, c_stockIdle )
// L658
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L662
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L663
AISetStockUnitNext( player, 1, c_PB_RoboticsFacility, c_stockIdle )
// L664
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L668
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L669
AISetStockUnitNext( player, 1, c_PB_RoboticsFacility, c_stockIdle )
# mods/liberty.sc2mod
// L2117
AISetStockUnitNext( player, minPylonCount, c_PB_Pylon, c_stockAlways )
// L2186
AISetStockUnitNext( player, 3, c_PB_Gateway, c_stockIdle )
// L2198
AISetStockUnitNext( player, 2, c_PU_Observer, c_stockAlways )
// L2205
AISetStockUnitNext( player, 3, c_PU_Observer, c_stockAlways )
// L2206
AISetStockUnitNext( player, 2, c_PU_WarpPrism, c_stockAlways )
// L2212
AISetStockUnitNext( player, 6, c_PB_Gateway, c_stockIdle )
// L2213
AISetStockUnitNext( player, 1, c_PB_TwilightCouncil, c_stockIdle )
// L2214
AISetStockUnitNext( player, 3, c_PB_RoboticsFacility, c_stockIdle )
// L2215
AISetStockUnitNext( player, 1, c_PB_Stargate, c_stockIdle )
// L2219
AISetStockUnitNext( player, 3, c_PB_Forge, c_stockAlways )
# mods/liberty.sc2mod
// L2646
AISetStockUnitNext( player, 1, c_TU_Medivac, c_stockAlways )
// L2647
AISetStockUnitNext( player, 2, c_TU_Raven, c_stockAlways )
// L2653
AISetStockUnitNext( player, 4, c_TU_Medivac, c_stockAlways )
// L2659
AISetStockUnitNext( player, 4, c_TB_Barracks, c_stockIdle )
// L2660
AISetStockUnitNext( player, 1, c_TB_BarracksTechLab, c_stockIdle )
// L2661
AISetStockUnitNext( player, 1, c_TB_BarracksReactor, c_stockIdle )