Memory Leaks

Pyropenguins

New Member
Reaction score
4
I need some help with the memory leaks. I'm not sure how to spot them. Please help me with this trigger and maybe i will learn from it :)
Trigger:
  • First
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins construction
    • Conditions
    • Actions
      • Unit Group - Remove all units from Chain
      • Unit Group - Add (Triggering unit) to Chain
      • Trigger - Run Net <gen> (checking conditions)

Trigger:
  • Next
    • Events
    • Conditions
    • Actions
      • Set BlockCheck = False
      • Unit Group - Pick every unit in Chain and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to True) and ((((Matching unit) is in Chain) Equal to False) and ((Distance between (Position of (Picked unit)) and (Position of (Matching unit))) Less than 182.00) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to Chain
              • Set BlockCheck = True
      • If (BlockCheck Equal to True) then do (Trigger - Run (This trigger) (checking conditions)) else do (Trigger - Run Finally <gen> (checking conditions))

Trigger:
  • Last
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Number of units in (Units in 1RedPinkGreen L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1RedPinkGreen R <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
              • ((Number of units in (Units in 1RedPinkGreen L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1Red Top Right <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
              • ((Number of units in (Units in 1RedPinkGreen L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1Red Bot R <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
              • ((Number of units in (Units in 1Red Top L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1RedPinkGreen R <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
              • ((Number of units in (Units in 1Red Top L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1Red Top Right <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
                • ((Number of units in (Units in 1Red Top L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1Red Bot R <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
                • ((Number of units in (Units in 1Red Bot L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1RedPinkGreen R <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
                • ((Number of units in (Units in 1Red Bot L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1Red Top Right <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
                  • ((Number of units in (Units in 1Red Bot L <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1) and ((Number of units in (Units in 1Red Bot R <gen> matching (((Matching unit) is in Chain) Equal to True))) Greater than or equal to 1)
        • Then - Actions
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
          • Do nothing

+rep for help :thup:
 

Tom Jones

N/A
Reaction score
437
Diddn't you notice the fancy [noparse]
Trigger:
[/noparse] tags? If not, click the 'a' icon an put trigger code inside those tags.

Trigger Next:
One group leak.
Two point leaks.

Trigger Last:
Two group leaks per condition.
 

Karawasa

Element Tower Defense
Reaction score
38
There are enough resources around to answer your question. Go read a tutorial (or use the Leak Checker) before asking.
 

Pyropenguins

New Member
Reaction score
4
:) Okie Dokie an no i didnt see the fancy
Trigger:
tags lol thanks also for pointing those out and the leaks ill get right on it :)
 
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