Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[General] Worker count on gold mines.

Discussion in 'World Editor Help Zone' started by Kenshin_IV, Oct 17, 2020.

  1. Kenshin_IV

    Kenshin_IV

    Joined:
    Oct 17, 2020
    Messages:
    2
    Resources:
    0
    Resources:
    0
    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!

    [​IMG]
    I would really appreciate all the help!

    Thank you,
    Piotr.
     
  2. biridius

    biridius

    Joined:
    Apr 3, 2018
    Messages:
    197
    Resources:
    4
    Maps:
    4
    Resources:
    4
    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.
     
  3. Kenshin_IV

    Kenshin_IV

    Joined:
    Oct 17, 2020
    Messages:
    2
    Resources:
    0
    Resources:
    0
    Thank you for respond :D
    Atleast it lead me somehow somewhere,
    I'll see if I can do it myself