AISetStock
native void AISetStock (int player, int count, string aliasType);
Add an element to the production queue
The stock system is working in bulk. You add all the units you want to the production queue. Then as soon as you add the same unit than before it starts a new bulk. It doesn't go to the next one until all the previous units are built.
All the units in a bulk are being produced in paralell. The first units added are being produced and if you have the ressources to start the next then it will also be created.
Parameters
- int player
Player number
- int count
Number of elements
- string aliasType
Element you want to add the production queue. It can be either a unit, a building or an upgrade. Can be one of
Examples
- Example: Protoss Build
void ProtossOpenGnd0 (int player) { AIClearStock(player); // Define first units and buildings AISetStock( player, 1, c_PB_Nexus ); AISetStock( player, 10, c_PU_Probe ); AISetStock( player, 1, c_PB_Pylon ); AISetStock( player, 1, c_PB_Gateway ); // By redefining Pylons you tell the AI to complete all the previous // tasks before starting these new ones AISetStock( player, 3, c_PB_Pylon ); AISetStock( player, 18, c_PU_Probe ); AISetStock( player, 2, c_PU_Zealot ); // Another block is done by redefining Pylon AISetStock( player, 4, c_PB_Pylon ); AISetStock( player, 6, c_PU_Zealot ); } // The previous code means: // Build 1 Nexus, 10 Probe, 1 Pylon, 1 Gateway // When everything listed before is done then // Build 2 Pylon, 8 Probe, 2 Zealot // When everything listed before is done then // Build 1 Pylon, 4 Zealot // Units and buildings inside a block are created in parallel