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

[Solved] Does anything here leak?

Status
Not open for further replies.
Level 8
Joined
Jul 29, 2010
Messages
319
I'm not very good at spotting leaks, I've read the tutorial on it but i just can't seem to get a hold of it and need some help from time, anyway just wondering if anyone could point out any leaks here for me?

All help is appreciated :D
  • Lunge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Over Charge
    • Actions
      • Set L_Index = (L_Index + 1)
      • Set L_Caster[L_Index] = (Triggering unit)
      • Set L_Target[L_Index] = (Target point of ability being cast)
      • Set L_Counter[L_Index] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • L_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on EVERY 001 <gen>
        • Else - Actions
  • EVERY 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer L_Loop_Integer) from 1 to L_Index, do (Actions)
        • Loop - Actions
          • Unit - Move L_Caster[L_Loop_Integer] instantly to ((Position of L_Caster[L_Loop_Integer]) offset by 15.00 towards (Facing of L_Caster[L_Loop_Integer]) degrees)
          • Set L_Counter[L_Loop_Integer] = (L_Counter[L_Loop_Integer] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • L_Counter[L_Loop_Integer] Greater than or equal to 30
            • Then - Actions
              • Set L_Caster[L_Loop_Integer] = L_Caster[L_Index]
              • Set L_Target[L_Loop_Integer] = L_Target[L_Index]
              • Set L_Counter[L_Loop_Integer] = L_Counter[L_Index]
              • Set L_Index = (L_Index - 1)
              • Set L_Loop_Integer = (L_Loop_Integer - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • L_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
  • Unit - Move L_Caster[L_Loop_Integer] instantly to ((Position of L_Caster[L_Loop_Integer]) offset by 15.00 towards (Facing of L_Caster[L_Loop_Integer]) degrees)
Leaks two points.
You need two point variables.

It should look similar to this:
  • Set Point1 = Position of L_Caster[L_Loop_Integer]
  • Set Point2 = Point1 offset by 15.00 towards (Facing of L_Caster[L_Loop_Integer]) degrees
  • Unit - Move L_Caster[L_Loop_Integer] instantly to Point2
  • Custom script: RemoveLocation(udg_Point1)
  • Custom script: RemoveLocation(udg_Point2)
 
Level 8
Joined
Jul 29, 2010
Messages
319
  • Unit - Move L_Caster[L_Loop_Integer] instantly to ((Position of L_Caster[L_Loop_Integer]) offset by 15.00 towards (Facing of L_Caster[L_Loop_Integer]) degrees)
Leaks two points.
You need two point variables.

It should look similar to this:
  • Set Point1 = Position of L_Caster[L_Loop_Integer]
  • Set Point2 = Point1 offset by 15.00 towards (Facing of L_Caster[L_Loop_Integer]) degrees
  • Unit - Move L_Caster[L_Loop_Integer] instantly to Point2
  • Custom script: RemoveLocation(udg_Point1)
  • Custom script: RemoveLocation(udg_Point2)
Thank you :D :)
 
Status
Not open for further replies.
Top