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

How to remove Unit Group again?

Status
Not open for further replies.
Level 11
Joined
Dec 8, 2006
Messages
334
Question remains, when should I destroy it?
Am I supposed to destroy only empty UnitGroups/UnitGroups I won't use anymore?
For example:
  • Set GroupVar = Pick every unit in (Playable Map Area)
  • Unit Group - Pick every unit in GroupVar and do (Unit - Hide (Picked unit))
  • Custom script: call DestroyGroup(udg_GroupVar)
  • Wait - 0.02 seconds
  • Unit Group - Pick every unit in GroupVar and do (Unit - Unhide (Picked unit))
Will it work? Or am I supposed to do it like this:
  • Set GroupVar = Pick every unit in (Playable Map Area)
  • Unit Group - Pick every unit in GroupVar and do (Unit - Hide (Picked unit))
  • Wait - 0.02 seconds
  • Unit Group - Pick every unit in GroupVar and do (Unit - Unhide (Picked unit))
  • Custom script: call DestroyGroup(udg_GroupVar)
It's basically the same in this example, but it matters in my map, so, yeah...
Thanks for answers
 
Level 9
Joined
Apr 3, 2008
Messages
700
If you use Wait action, you need variable and the 2nd way.

But if you don't use Wait, you can make it easier, without variable:
  • Unit Group - Pick every unit in every unit in (Playable Map Area) and do (Unit - Hide (Picked unit))
  • Custom script: call DestroyGroup( GetLastCreatedGroup() )
And the 1st trigger you wrote won't work like this at all. Becouse you can't do smth with destroyed group.
(In your example you destroy it, and then unhide units in destroyed group. It's impossible).
 
Level 7
Joined
Jul 12, 2008
Messages
295
Use these programs for leak removing. They'll help u in continuing with leak removing
 

Attachments

  • Leak Check v2.zip
    264.7 KB · Views: 57
  • Leak Helper.zip
    10.3 KB · Views: 49
Status
Not open for further replies.
Top