[General] Worker count on gold mines.

Status
Not open for further replies.
Level 3
Joined
Oct 17, 2020
Messages
8
Hello,

Let me start off with that I have almost 0 knowledge about map editor.
I m wondering if it's possible and if someone is able to create or guide me through the process of creating a worker count on gold mines like on this screenshot!

aReqCu1.png

I would really appreciate all the help!

Thank you,
Piotr.
 
Level 23
Joined
Apr 3, 2018
Messages
465
You can detect the order "harvest" or "smart" issued to a worker and if the target is a goldmine, add the worker to a unit group attached to that gold mine.
Then if the worker gets any other order than "resumeharvesting" or "harvest" or if the target of "harvest" is not the same goldmine, remove the unit from the group.

Then you would need to create a text tag on top of the goldmine, and periodically set the text to the number of units in the group.

To have this on multiple goldmines would also need all these variables (group, text tag) to be arrays.
 
Level 3
Joined
Oct 17, 2020
Messages
8
You can detect the order "harvest" or "smart" issued to a worker and if the target is a goldmine, add the worker to a unit group attached to that gold mine.
Then if the worker gets any other order than "resumeharvesting" or "harvest" or if the target of "harvest" is not the same goldmine, remove the unit from the group.

Then you would need to create a text tag on top of the goldmine, and periodically set the text to the number of units in the group.

To have this on multiple goldmines would also need all these variables (group, text tag) to be arrays.
Thank you for respond :D
Atleast it lead me somehow somewhere,
I'll see if I can do it myself
 
Status
Not open for further replies.
Top