How to get ride of that leak ?

RedSword

New Member
Reaction score
4
Hi,

I've the following "shard" of trigger :

Trigger:
  • Unit Group - Pick every unit in Temp_Group_ToHeal and do (Actions)
    • Loop - Actions
      • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + ((Real(Temp_Spell_Level)) + 2.00))%
      • Set Temp_Point = (Position of (Picked unit))
      • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\Heal\HealTarget.mdl
      • Wait for (Last played sound) to be 0.00 seconds from finished playing
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_Temp_Point)
    • Custom script: call DestroyGroup(udg_Temp_Group_ToHeal)


The problem is that when I add that last line ("Custom script: call DestroyGroup(udg_Temp_Group_ToHeal") my trigger no longer works more than once; and if I do not put, it it'll leak...

How may I get ride of that leak problem... ?
 

RedSword

New Member
Reaction score
4
Uh... ty...

then when I do "Pick every unit in VARIABLE_HERE" it doesn't leak right ? if there is no variable then it leak... right ?
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Ofcource global groups leak and can u plz show the whole triger
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Yes and he does not add he picks man i cant believe u say it doesnt leak whoa deep breat ha ok
 

RedSword

New Member
Reaction score
4
Trigger:
  • The trigger
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Temp_Group_Soother = (Units owned by (Picked player) matching (((Matching unit) has buff Soothing Aura ) Equal to True))
          • Unit Group - Pick every unit in Temp_Group_Soother and do (Actions)
            • Loop - Actions
              • Set Temp_Spell_Level = (Level of Soothing Aura for (Picked unit))
              • Set Temp_Point = (Position of (Picked unit))
              • Set Temp_Group = (Units within 500.00 of Temp_Point matching ((((Owner of (Matching unit)) is an ally of (Picked player)) Equal to True) and (((Matching unit) is A structure) Equal to False)))
              • Custom script: call RemoveLocation(udg_Temp_Point)
              • Unit Group - Remove (Picked unit) from Temp_Group
              • For each (Integer A) from 1 to (Temp_Spell_Level + 2), do (Actions)
                • Loop - Actions
                  • Set Temp_Real = 100.00
                  • Unit Group - Pick every unit in Temp_Group and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Percentage life of (Picked unit)) Less than Temp_Real
                        • Then - Actions
                          • Set Temp_Real = (Percentage life of (Picked unit))
                          • Set Temp_Unit_LowestHP = (Picked unit)
                        • Else - Actions
                          • Do nothing
                  • Unit Group - Remove Temp_Unit_LowestHP from Temp_Group
                  • Unit Group - Add Temp_Unit_LowestHP to Temp_Group_ToHeal
              • Custom script: call DestroyGroup(udg_Temp_Group)
              • Unit Group - Pick every unit in Temp_Group_ToHeal and do (Actions)
                • Loop - Actions
                  • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + ((Real(Temp_Spell_Level)) + 2.00))%
                  • Set Temp_Point = (Position of (Picked unit))
                  • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\Heal\HealTarget.mdl
                  • Wait for (Last played sound) to be 0.00 seconds from finished playing
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_Temp_Point)
              • Custom script: call DestroyGroup(udg_Temp_Group_ToHeal)
          • Custom script: call DestroyGroup(udg_Temp_Group_Soother)


The last lines are where my "shard" is.

Basicly my whole trigger takes every 4 seconds the units with a certain ability and then heal the weakest units near them.
 
Reaction score
86
Exactly. It doesn't leak if you take out that line. Instead at that point just remove all the units from the group.

** At least the TempGroupToHeal doesnt leak. Idk abt the rest. Too lazy to check
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
You hav to take away the destroy group thing like that guy mentioned in post #2
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
U cant just asume he adds the units 99% of the time u need to set a variable and destroy it
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Yes this is that 1% of the time and ur right sory
 

RedSword

New Member
Reaction score
4
So is it right like this ? (to be sure)

Trigger:
  • [...]
    • Unit Group - Pick every unit in Temp_Group_ToHeal and do (Actions)
      • Loop - Actions
        • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + ((Real(Temp_Spell_Level)) + 2.00))%
        • Set Temp_Point = (Position of (Picked unit))
        • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\Heal\HealTarget.mdl
        • Wait for (Last played sound) to be 0.00 seconds from finished playing
        • Special Effect - Destroy (Last created special effect)
        • Custom script: call RemoveLocation(udg_Temp_Point)
    • Unit Group - Remove all units from Temp_Group_ToHeal
    • Custom script: call DestroyGroup(udg_Temp_Group_Soother)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top