Not sure if anyone still needs to know this info but, heres how you limit the number of workers you can build, and be able to build another if one gets killed or used up (ie zerg drone mutating into a building)From opening the map editor, find the 'Data' button on the top near the 'Triggers' button.Like the Triggers it opens up a new window, click on the 'Requirements' tab
Next click on the 'Requirement' drop down menu on top and click 'Add Requirement'
Give it a name, doesnt matter what it is, but I suggest using the name of the unit that you are limiting the number built of. I.E Drone, Probe or SCV.Next the ID under the name, just simple press the 'Suggest' button to make things easier and simpleMove down and select the race the unit is associated withSelect the Tech type. (Basically the type of limitation its going to be.) In this case because we are limiting units, select 'Unit'Thats it for that part, click 'OK'
Next with your new Requirement selected in the left box, in the right box you should have 2 green items and the rest is grayed out.. If this is what you see you're on the right track
In the right box under 'Field' find the line that says "(Basic)Basic: Requirement -" and across from that to the right should say ((None)(None))Double Click the '((None)(None))'Should open a new window with the name of you requirement and underneathe it , 'Use' and 'Show" (Here determine if you want the button to always be visible or not. If you choose 'Use' the button will be colored until the requirements are met and then go gray until the requirements are not met. Which it will then become colored again until requirements are re-met. I.E you set up to build max 15 drones. You build 15 drones, meeting the requirements, button grays out. You kill a drone leaving you with 14, not meeting the requirements, the button becomes colored again, until you create that 15th. If you choose 'Show' it does the EXACT same thing as 'Use' except the button wont be grayed out, it will simply dissapear when the requirements are met, and reappear when they arent met.)So Choose one, right click on it and select 'Add Requirement Node'Select the new node, should be 'And' by default'
on the right is a drop down menu, select it and select 'Not Equal to' (Here also you may want to add a tool tip as to why the player can no longer build these units. This tooltip will show up once the requirements are met. So something like "Must have fewer than 15 Drones" for example)On the left again you see your 'Not Equal To' node, right click that and select 'Add Requirement Node' Do this twice. You should see something like this Not Equal to
AndSelect the first 'And' and on the right select 'Count Unit'For Alias, select the unit of which you are limiting (I.E Drone)For State, select 'Queued or Better' (However for zerg, because their unit build Process isn't queued but rather each larva is selected and used, you must choose 'In Progress or Better'Now select the second 'And' and again on the right select 'Constant'For Value Select the max number of this particular unit you wish to have before the requirement is met.Thats it for that part, Click 'OK'
Now to add the requirement you made to a building process.
where you once selected the 'Requirements' tab, now to the left, selet the 'Units' tabIn the box to the left, find the Structure (or in the zergs case the unit) that creates the unit you are limiting. (I.E Terran = Command Center Protoss = Nexus and Zerg = Larva)For Terran when you have the 'Command Center' selected, below is a list of all the Command Centers abilities, buttons, requirements.. etc. Select Command Center - Train (Command Center)For Protoss when you have 'Nexus' selected, same as terran, only select 'Nexus - Train (Nexus)For Zerg when you have 'Larva' selected, underneath select 'Larva - Morph Unit (Larva-> Basic)For either of the above cases, on the right side you now see a load of lines, Simple double click the very top one, which opens a new window, and again double click the very top one (Morph to Drone, Train SCV or Warp in Probe)Which Opens another window.
In this window there is a bunch of changes you can make, resource cost, build time, recharge time, charges avaliable etc.
To simply insert the new requirement, you will see the 'Requirement' and its field is blank. From the list below it, find your requirement and select it (Should be under the sub-folder 'Unit')Then click 'OK'Voila!! You have now created a limiting requirement for that unit
You can copy and paste that Requirement and modify it to fit other units if you wish.