• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

slow worker

Status
Not open for further replies.
Hi
I'm making a map, but there is a bug that i can't fix alone.
So, first, i modified the gold mine ability and then, 12 worker can go in at the same time.
When i train worker, they move normaly, it's ok. They go in the gold mine, they go out, they are ok. they go back in the gold mine, they go out, they move very slow. IT'S ALWAYS WHEN THEY GO OUT OF THE GOLD MINE THE SECOND TIME... WHY...?
so, is there someone who can help me to fix this plz?
thx :)
 
Fantastic. Easy fix. What movement speed do you want? 270?

  • Events
    • Time - Every 0.50 seconds of game time
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (units matching (matching unit is (a Peasant))) and do multiple actions:
      • Loop - Actions
        • If (picked unit has 0 buffs) then do:
          • Then - Actions
            • Unit - Set movement speed of (picked unit) to 270
          • Else - Actions
 
Oh I'm sorry, I just tested it with the default settings. Yea, after I made them like you did they were moving slow aswell.

But I found another solution regarding the mining slow movement.
  • FastGoldHarvest
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Custom value of (Triggering unit)) Equal to 0
          • Or - Any (Conditions) are true <// You can remove this Or - Any it's optional. But only this one ;D
            • Conditions
              • (Unit-type of (Target unit of issued order)) Equal to Gold Mine
              • (Unit-type of (Target unit of issued order)) Equal to Town Hall
          • Or - Any (Conditions) are true
            • Conditions
              • (Issued order) Equal to (Order(harvest))
              • (Issued order) Equal to (Order(resumeharvesting))
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 1
      • Unit - Order (Triggering unit) to Harvest (Target unit of issued order)
      • Unit - Set the custom value of (Triggering unit) to 0
A little drawback from this is though that the worker get a little stuck when harvesting, only a bit. But it's still faster than having that slow movement.
 
Someone please check this for accuracy. I did a little optimizing of Dragoon's trigger to make it run faster:

  • FastGoldHarvest
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Custom value of (Triggering unit)) Equal to 0
      • Or - Any (Conditions) are true <// You can remove this Or - Any it's optional. But only this one ;D
        • Conditions
          • (Unit-type of (Target unit of issued order)) Equal to Gold Mine
          • (Unit-type of (Target unit of issued order)) Equal to Town Hall
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(harvest))
          • (Issued order) Equal to (Order(resumeharvesting))
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 1
      • Custom script: call IssueTargetOrder (GetTriggerUnit(), "harvest", "GetTargetUnit()")
      • Unit - Set the custom value of (Triggering unit) to 0
 
Status
Not open for further replies.
Top