/* Demo Map Script for Player 2*/ /* General values */ public int player; public int power; private int n; //keeps track of current factory /* Factory values */ public int numFacts; public STRUCTURE fact[4]; //must be >= numFacts public STRUCTUREID factID[4]; public int assX[4], assY[4]; /* Build Templates */ public TEMPLATE build[4]; //must be >= numFacts /* Triggers */ trigger factTrig(every, 100); //new build every 10 seconds /* Events */ event startup(init) { setPowerLevel(power, player); //set starting power while (n < numFacts) { setAssemblyPoint (fact[n], assX[n], assY[n]); //set assembly points (can't do later in case the factories are dead!!! n = n +1; } n = 0; } //build list for all factories (n controls which!) event factEvnt(factTrig) //try building every 10 seconds { if (not (buildingDestroyed (factID[n], player))) { if (structureIdle(fact[n])) { //build different template for each factory!!!!!! buildDroid (build[n], fact[n], player, 1); } } n = n +1; if (n >= numFacts) { n = 0; } }