• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] How can i fix this leak?

Status
Not open for further replies.
Level 14
Joined
Mar 4, 2009
Messages
1,156
I heard that this condition leaks but i don´t know how could i destroy the group if it is condition?


  • ((Random unit from (some unit) is alive) Not equal to True
for example....


  • ((Random unit from (Units owned by Player 12 (Brown) matching (((Matching unit) is A Hero) Equal to True))) is alive) Not equal to True
 
Make a global variable called group and set the type to unitgroup.

Then in your trigger do this:
  • Name
    • Set group = (Units owned by Player 12 (Brown) matching (((Matching unit) is A Hero) Equal to True))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Random unit from group is alive) Not equal to True)
      • Then - Actions
        • -------- whatever you want --------
      • Else - Actions
    • Custom Script - call DestroyGroup(group)
 
Last edited:
Make a global variable called group and set the type to unitgroup.

Then in your trigger do this:
  • Name
    • Set group = (Units owned by Player 12 (Brown) matching (((Matching unit) is A Hero) Equal to True))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Random unit from group is alive) Not equal to True)
      • Then - Actions
        • -------- whatever you want --------
      • Else - Actions
    • Custom Script - call DestroyGroup(group)

i know that but its a bit annoying :bored: is there any other way to do that? xD

BTW i shure you will know this
i set the name of player 1 to player 1 + dead
and i want to return it to player 1 how can i do that?
 
Status
Not open for further replies.
Back
Top