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

[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
 

Ralle

Owner
Level 79
Joined
Oct 6, 2004
Messages
10,183
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:
Level 14
Joined
Mar 4, 2009
Messages
1,156
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.
Top