First thing is that you do not need to make screenshots of your triggers, you can use the trigger tags
to copy your triggers. You just right click on all your triggers then on "Copy as Text" and then you paste in the tags. Since I want to solve your problem, you will also see how to use the trigger tags correctly:
-
Barracks01
-

Events
-


Time - Elapsed game time is 5.00 seconds
-

Conditions
-

Actions
-


Unit - Create 1 Mur'gul Slave (BUILDER) for Player 2 (Blue) at (Center of PeonSpawn <gen>) facing Default building facing degrees
-


Sound - Play MurlocReady1 <gen> at 100.00% volume, attached to (Last created unit)
-


Unit - Order (Last created unit) to build a Spawning Grounds at (Center of Barracks01 <gen>)
However, your triggers
leak twice which means that you may suffer from lag when you play the game for a long period (well, these two leaks are insignificant but if you have excessive leaks then it gets problematic). To remove the leaks you have (location leaks in your case), you'll have to add these functions:
-
Barracks01
-

Events
-


Time - Elapsed game time is 5.00 seconds
-

Conditions
-

Actions
-


Set PeonSpawn = (Center of PeonSpawn <gen>)
-


Set BarracksBuildPoint = (Center of Barracks01<gen>)
-


Unit - Create 1 Mur'gul Slave (BUILDER) for Player 2 (Blue) at PeonSpawn facing Default building facing degrees
-


Custom script: call RemoveLocation(udg_PeonSpawn)
-


Sound - Play MurlocReady1 <gen> at 100.00% volume, attached to (Last created unit)
-


Unit - Order (Last created unit) to build a Spawning Grounds at BarracksBuildPoint
-


Custom script: call RemoveLocation(udg_BarracksBuildPoint)
PeonSpawn and BarracksBuildPoint are two
Point variables. To create them, press Ctrl + B, then Ctrl + N, type the name of one of the two variables, select Point as variable type then press OK. Repeat this for the other variable. Once you did that, use the
Set Variable function to insert the first two commands. Use
Custom Script for the other two new other commands. You must copy exactly these words in the first script
call RemoveLocation(udg_PeonSpawn) and these words
call RemoveLocation(udg_BarracksBuildPoint) in the second one. Now you fixed the leaks but not your problem yet. What you want to achieve is nearly impossible because, as mogulkhan1Axe said, there are no commands to refer to the unit building a structure. There is a semi-solution that will serve the purpose. Firstly, you must create a Unit variable (do the same things you did for the point variables but instead of selecting point, select unit). Name the variable
Worker for example and add this function just below the "Create 1 Mur'gul" command:
-
Set Worker = (Last created unit)
Now create a whole new trigger now (call it Worker Finishes Construction for example)
-
Worker Finishes Construction
-

Events
-


Unit - A unit Finishes construction
-

Conditions
-


(Unit-type of (Constructed structure)) Equal to Spawning Grounds
-

Actions
-


Trigger - Turn off (This trigger)
-


Set A New Point Variable You'll Have To Create = (Center of region where worker will move)
-


Unit - Order Worker to Move to (Point)
-


Custom script: call RemoveLocation(udg_Point)
That's all. I'd also recommend reading
this tutorial about leaks since it could help you prevent other types of leaks.