Not sure if this leaks

Slywolf15

Member
Reaction score
5
Wanted a second opinion

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Attacking unit) Equal to StaffofBewildermentCaster
    Then - Actions
        Wait 0.50 seconds
        Set Loc1 = (Position of StaffofBewildermentCaster)
        Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of Loc1 matching (((Matching unit) is an illusion) Equal to True))) and do (Actions)
            Loop - Actions
                Set Loc2 = (Position of (Picked unit))
                Set Loc3 = (Position of (Attacked unit))
                Unit - Move StaffofBewildermentCaster instantly to Loc2, facing StaffAttackTarget
                Animation - Play StaffofBewildermentCaster's stand animation
                Unit - Move (Picked unit) instantly to Loc1, facing StaffAttackTarget
                Unit - Order (Picked unit) to Attack (Attacked unit)
                Animation - Play (Picked unit)'s stand animation
                Custom script:   call RemoveLocation( udg_Loc2 ) 
                Custom script:   call RemoveLocation( udg_Loc3 ) 
        Custom script:   call RemoveLocation( udg_Loc1 ) 
    Else - Actions
 

jig7c

Stop reading me...-statement
Reaction score
123
yes it leaks :(

make your unit group a variable and then destroy it at the end of the trigger :)
call DestroyGroup (udg_whatever)
 

Slywolf15

Member
Reaction score
5
yes it leaks :(

make your unit group a variable and then destroy it at the end of the trigger :)
call DestroyGroup (udg_whatever)

Thanks, and I can't remember what all leaks. Is it, Positions, Unit Groups, and Special Effects?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top