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

Unit Groups

Discussion in 'World Editor Help Zone' started by Raging Ent, Jun 24, 2011.

  1. Raging Ent

    Raging Ent

    Joined:
    Jul 15, 2009
    Messages:
    552
    Resources:
    40
    Icons:
    34
    Packs:
    3
    Maps:
    3
    Resources:
    40
    If a unit in a unit group dies, is it still in the unit group?
    And if you remove it, does it get removed from unit group too or does WC3 save the handle?
     
  2. Kino

    Kino

    Joined:
    Oct 12, 2008
    Messages:
    1,714
    Resources:
    19
    Models:
    5
    Maps:
    14
    Resources:
    19
    Pretty sure it does remain.

    Im guessing it does get removed, but I may be wrong.
     
  3. Raging Ent

    Raging Ent

    Joined:
    Jul 15, 2009
    Messages:
    552
    Resources:
    40
    Icons:
    34
    Packs:
    3
    Maps:
    3
    Resources:
    40
    Hehe well that's my point!
    I use unitgroups but never really thought about them.
    And since using integers to count 'living heroes' is bugging for me I thought of using unit groups.. but I need in-depth information on them.
     
  4. rysnt11

    rysnt11

    Joined:
    Jan 21, 2010
    Messages:
    2,051
    Resources:
    0
    Resources:
    0
    A unit that is remove is leaking, instead using 'unit - remove triggering unit from the game', use the hide unit
    And if the removed unit is in a unit group afaik, the unit still in there, until removed from that group
     
  5. Raging Ent

    Raging Ent

    Joined:
    Jul 15, 2009
    Messages:
    552
    Resources:
    40
    Icons:
    34
    Packs:
    3
    Maps:
    3
    Resources:
    40
    Wouldn't thousands of hidden dummy units lag?
    As far as I understand you mean 'don't remove, it leaks, hide instead'..
     
  6. rysnt11

    rysnt11

    Joined:
    Jan 21, 2010
    Messages:
    2,051
    Resources:
    0
    Resources:
    0
    Sorry, i mean, when the unit is no longer needed (in this case dummy unit) add expiration timer, then create new trigger
    Event
    A unit dies
    Condition
    Unit type of triggering unit is equal to your dummy unit type
    Action
    Hide triggering unit

    This should prevent leak of removal unit
    If you still doesn't belive it, then try this
    Create a trigger that spawns 1 footman every 0.5s
    Then create another trigger that remove every unit that enters the playable map area (use variable to prevent location leak)
    Try it, after some time, your game will lagg, like a hell
    :)
     
  7. Raging Ent

    Raging Ent

    Joined:
    Jul 15, 2009
    Messages:
    552
    Resources:
    40
    Icons:
    34
    Packs:
    3
    Maps:
    3
    Resources:
    40
    Well I believe you..

    But in my case, the dying unit will respawn after some time.
    So can't remove it.. I can hide it temporarily but why would I..
     
  8. rysnt11

    rysnt11

    Joined:
    Jan 21, 2010
    Messages:
    2,051
    Resources:
    0
    Resources:
    0
    Hmm...
    I think the dying unit isn't 'reincarnated' i have seen a tutorial about respawning unit, and all it does is, re create same unit
     
  9. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34