Leak Check

the_ideal

user title
Reaction score
61
Trigger:
  • Marked For Death 2
    • Events
      • Time - Every 8.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in MarkedForDeath) Less than or equal to 5
        • Then - Actions
        • Else - Actions
          • Set MarkedForDeath = (Random 5 units from MarkedForDeath)
      • Set point1 = (Position of MarkedForDeathUnit)
      • Set unitgroup = (Units within 800.00 of point1 matching (((Matching unit) is in MarkedForDeath) Equal to True))
      • Unit Group - Pick every unit in unitgroup and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of MarkedForDeathUnit) at point1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Death Coil (dummy) to (Picked unit)
          • Unit - Order (Last created unit) to Undead Death Knight - Death Coil (Picked unit)
      • Custom script: call RemoveLocation (udg_point1)
      • Custom script: call DestroyGroup(udg_unitgroup)


Could someone check this for leaks? Does the point leak because I reference it multiple times?

Thanks.
 

the_ideal

user title
Reaction score
61
Thanks!

But if I destroy it, the trigger won't know which units to cast death coil on after the first run. How can I fix this?
 

the_ideal

user title
Reaction score
61
Yeah, but if I destroy the group then there will be no way to figure out which units need to have death coil cast on them. In other words, I need the unit group solely to store the information, and destroying it removes my ability to do so.
 

the_ideal

user title
Reaction score
61
> Well, if you're re-using the group, is there a need to remove the group?

I don't know, you seem to think so. =p
If Markfordeath is an unit group, you must remove it.

You tell me. My assumption was that I don't need to destroy it because I never "use" it. I'm not sure though.
 

the_ideal

user title
Reaction score
61
Trigger:
  • Marked For Death 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Marked For Death (c)
    • Actions
      • Set MarkedForDeathUnit = (Triggering unit)
      • Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit Group - Add (Target unit of ability being cast) to MarkedForDeath

This is the other trigger. It registers when you cast the ability on a unit, then adds the unit to the unit group. The point of the spell is that you cast it on a unit and then every 8 seconds the unit gets hit by a death coil.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
No no need to destroy the group but why do u hav that 5 rendom units thats the only problem it leaks. Make a new group. Set <new group> equal 5 random units from markfordeath. Then at end remove group.
 
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