• 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.

[Spell] Order of Return Resources and carried resources of a worker

Status
Not open for further replies.
Level 28
Joined
Feb 2, 2006
Messages
1,630
Hi,
what is the string order of the "Return Resources" ability. I cannot find it in the object editor.
For the Gather ability I can only find abilities for Acolytes and Wisps but I can see that it is "harvest".

Is there any possibility to get the resources a worker is carrying and does the order change when a worker disappears inside a goldmine?
 
Level 13
Joined
Feb 5, 2018
Messages
567
The issue lies in the actual code of the ability, since it is "Return gold and lumber" so it is not seperated.

The actual orders are harvest and resumeharvesting, but as said the orderstring always returns as either one.

Although something just occured to me, maybe we could mess with Harvest (Ghouls Lumber). This also still just might return the order as harvest and resumeharvesting. Can't try it at the moment.
 
Level 28
Joined
Feb 2, 2006
Messages
1,630
Hm too bad since you can order a unit to move away from harvesting, so you can never know how many resources it has.
I thought about creating a dummy hall for a dummy player and letting the unit return the resources to it and checking the player's resources to get how many it has and then to let collect it somehow back from a dummy tree and a dummy goldmine xD.
All these orders cannot be done without sleeps in between, so it is pretty useless I guess.

Another idea is that a unit harvests a tree and you see how much lumber it has from the tree's hitpoints?
The same for a unit which disappears in a goldmine. You have to check how much gold is left in the goldmine?
I just have to detect if a unit is inside of the goldmine or not (there can only be one unit at a time right?) and the tree which is harvested.

edit:
From what I tested I got the following:
  • Ordering a worker into a goldmine leads to smart with the goldmine as target.
  • When the worker returns from the goldmine it is the resume order.
  • There is no order when he is inside or entering the goldmine. Maybe one could detect if the unit is hidden?
  • Ordering a worker to harvest a tree leads to smart with the tree as target.
  • During attacking the tree there is no order. I have no idea how I could detect that when the worker starts harvesting the tree or stops it.
  • I could start a timer which checks for the tree's life as long as the unit has the order smart to the tree and I would have to consider multiple workers being issued to the SAME tree. Besides, there could be damaging abilities killing the tree.
  • The "harvest" order is only issued when the worker returns the resources to the hall for gold and lumber, to send him back to the goldmine or tree/next tree.
 
Last edited:
Status
Not open for further replies.
Top