1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Count loaded units?

Discussion in 'World Editor Help Zone' started by stan0033, May 26, 2020.

  1. stan0033

    stan0033

    Joined:
    Jun 27, 2010
    Messages:
    1,866
    Resources:
    16
    Models:
    4
    Icons:
    1
    Packs:
    1
    Skins:
    2
    Maps:
    7
    Spells:
    1
    Resources:
    16
    Soo, for any ability or triggering intended to count units loaded in a unit, I don't see an easy way.
    There is event 'unit loads a unit into transport' but no such for unloaded.

    So if i want to increase the elvel of an abiility of a unit depending on how much units it has loaded

    Any solutioons?
     
  2. Macadamia

    Macadamia

    Joined:
    Jan 30, 2020
    Messages:
    876
    Resources:
    0
    Resources:
    0
    You could save the unit in a unit array once its loaded, and use the event is issued order with no target on the transporting unit, and then test if the units you saved in the array is loaded or not from the boolean comparisons.


    EDIT : err wait I think @Uncle made a system like this :
    [Solved] - How to Detect Units Unloaded with GUI?
     
  3. MrRious

    MrRious

    Joined:
    Jul 7, 2018
    Messages:
    135
    Resources:
    0
    Resources:
    0
    Isn't there a condition counting loaded units?
     
  4. Macadamia

    Macadamia

    Joined:
    Jan 30, 2020
    Messages:
    876
    Resources:
    0
    Resources:
    0
    Not that I remember, but nothing prevents you from storing the number in a global variable and increase it with the loading event and decrease it with @Uncle's unloading detection system.