Hi im actually working on or just finished something similar to what you want. <img src="smileys/smiley4.gif" border="0" align="middle" /> So maybe my solution can help you.
My initial idea was to use arrays to store whatever order each unit should do, but i find them very confusing in construct 2. And ran into some problems with them doing weird things, so dropped using them.
Instead i made a list object for each unit as they are created and added a "Unit_ID" variable that holds the UID of the unit it is linked to. This list can be seen as a queue of orders that the unit will perform.
So in your case it could be.
Miner.cargo_hold = 0 then Add to list "Go mine".
Miner.cargo_hold = 100 then Add to list "Return to base".
And so on.
Then you can make an event that check each miners order list.
So if miner1 have "Go mine" as the first item in the list. You can make an event that triggers if a unit have that job.
In my game two units cant work on the same thing at the time, so I added a function that make the units enter a "wait for job" state. It then goes through each unit one after another, to see if there are anything that needs to be done. And if its the case, that "job" gets locked to that unit.
Another way that can be useful as well, if you dont want to work with lists, is to add an Text variable to your miners called "Order" or whatever. And as default you set it to "None", if we assume that these miners uses fuel as well. An example could be:
Miner.order = "None" then Set Miner.order = "Go mine"
Miner.fuel = 100
Miner.order = "Go mine" then Miner fly nearest mining place.
Doing it by adding or updating the miners order each time they reach there goal. Will make it easier to keep track off them i think. Also it will make it easier to check you program if you can show the order of each unit as you test your program.
Assuming that suddenly one of your miners go crazy while testing, and you keep track of what order it have, will make it a lot easier to see where things might go wrong. For instant if a miner have order "Go mine", when it starts to act crazy. You can easily find the place in your program where it receive that order.
Also its a good idea to use "For each (ordered)" and then in expression add the <object>.UID, since UID of objects cant be the same, it will go through all objects of that type, one after another and will only pick one at the time.