• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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 15
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