Help with automine

BiGyElLoWhAt

New Member
Reaction score
1
I've tried this several ways, but essentially, when I rescue a group of units, they're automine stops. So I retrigger it, and anyone without gold mines, but anyone with doesn't. I've added both Harvest gold mine and return resources, but it seems that the latter cancels the previous command, as anyone with gold returns the resources and the rest just stop and do nothing.
Save the Town Begin
Events
Unit - Mystic Keep 0007 <gen> Changes owner
Conditions
Actions
Quest - Display to (All players) the Quest Discovered message: SAVE QUE'L THE'NOR ...
Unit Group - Order (Units in Region 004 <gen>) to Attack-Move To (Center of Region 006 <gen>)
Unit - Rescue Worker (Blood Elf) 0010 <gen> for Player 1 (Red) and Change color
Unit - Rescue Worker (Blood Elf) 0009 <gen> for Player 1 (Red) and Change color
Unit - Rescue Worker (Blood Elf) 0008 <gen> for Player 1 (Red) and Change color
Unit Group - Order workers to Harvest Gold Mine 0005 <gen>
Unit Group - Order workers to Return Resources

The attack move is used for the next trigger, but I want them in sequence.
What's the work around?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I played around with this a little bit and found out that units get temporarily paused after they have changed their owner. Even if you give orders to these units they will NOT perform them. No matter what.
They are stunned for somewhat around 3.0 seconds.


But here is what you can do:
Create a trigger that will order your peasants to collect gold AFTER a 3.0 second wait. It could look like this:
Trigger:
  • OnTakeOver Peasant
    • Events
      • Unit - A unit Changes owner
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Peasant
    • Actions
      • Wait 3.00 seconds
      • Unit - Order (Triggering unit) to Harvest Nearby Gold

I tested this and it worked for me.
If you only want to have those peasants harvest gold that were already harvesting gold before you can do this:
Trigger:
  • ClassifyHarvestingPeasants
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Peasant
      • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(harvest))
      • Then - Actions
        • Unit Group - Remove (Triggering unit) from PeasantsReturning
        • Unit Group - Add (Triggering unit) to PeasantsHarvesting
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Issued order) Equal to (Order(resumeharvesting))
          • Then - Actions
            • Unit Group - Remove (Triggering unit) from PeasantsHarvesting
            • Unit Group - Add (Triggering unit) to PeasantsReturning
          • Else - Actions
            • Unit Group - Remove (Triggering unit) from PeasantsHarvesting
            • Unit Group - Remove (Triggering unit) from PeasantsReturning

This will put workers into unit groups depending on whether they are currently harvesting gold or returning with gold. You can easily extend this trigger to also work with workers harvesting lumber.
Now you can decide whether to order the peasants to harvest gold or lumber after they have changed their owner.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top