I would write this slightly different
-
Disapperance and automate harvesting continue
-
Events
-
Unit - A unit Is issued an order targeting an object
-
Conditions
-
(Issued order) Equal to (Order(resumeharvesting))
-
Actions
-
Set CustomValue = (Custom value of (Ordered unit))
-
Set HarverstingWorker[CustomValue] = (Ordered unit)
-
Set OccupiedBuilding[CustomValue] = (Target unit of issued order)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer((Distance between (Position of HarverstingWorker[CustomValue]) and (Position of OccupiedBuilding[CustomValue])))) Equal to 150
-
Then - Actions
-
Unit - Hide HarverstingWorker[CustomValue]
-
Wait 3.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(OccupiedBuilding[CustomValue] is alive) Equal to True
-
Then - Actions
-
Unit - Unhide HarverstingWorker[CustomValue]
-
Set OccupiedBuilding[CustomValue] = No unit
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Tree_Cutter[CustomValue] Not Equal to No destructible
-
Then - Actions
-
Unit - Order HarverstingWorker[CustomValue] to Harvest Tree_Cutter[CustomValue]
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Mine_Target[CustomValue] Not Equal to No unit
-
Then - Actions
-
Unit - Order HarverstingWorker[CustomValue] to Harvest Mine_Target[CustomValue]
-
Else - Actions
-
Else - Actions
-
Unit - Kill HarverstingWorker[CustomValue]
-
Else - Actions
Now, I don't know if triggering unit will work for sure, so I changed it to ordered unit (should work the same way).
Maybe the trouble is, as you've been pointed out before me, that you are comparing to a distance strictly equal to 150, maybe you should be using
-
(Integer((Distance between (Position of HarverstingWorker[CustomValue]) and (Position of OccupiedBuilding[CustomValue])))) Lower or Equal to 150
that way, your ability will work in the area sorrounded by the circle with radius 150 (which by the way I don't remember if it's a long or short distance) and not only on the circle of radius 150.
Lower or equal to 150
Equal to 150
I also don't know where you set that tree/mine harvest, but I asume you are doing that the right way in another trigger (if not, then maybe that's also a problem).
Hope this is of any help.
I also hope the code is the same, I have checked it about 20 times so that it is the same way, but I'm human.