Quick Question Leaks

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • (Unit - Create 1 Footman (Tier 0) for (Picked player) at ((Picked player) start location) facing Default building facing degrees)

Doesnt that leak a point? At the ((Picked player) start location)?



Trigger:
  • If (((Region centered at ((Picked player) start location) with size (384.00, 384.00)) contains (Random unit from (Units owned by (Picked player) of type Tier Zero (foots)))) Equal to True) then do (Unit - Create 1 Footman (Tier 0) for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Do nothing)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Wow i dont believe it. So every 5 secs i make a point leak. LMFAO i have this going through the whole game for 12 players. I also have had multiple people look through my code to find leaks xD

@OneBadPsycho Yes it is.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
All the leaks here:
Code:
If (([COLOR="Blue"](Region centered at [COLOR="Red"]((Picked player) start location)[/COLOR] with size (384.00, 384.00))[/COLOR] contains (Random unit from [COLOR="Green"](Units owned by (Picked player) of type Tier Zero (foots)))[/COLOR]) Equal to True) then do (Unit - Create 1 Footman (Tier 0) for (Picked player) at [COLOR="Red"]((Picked player) start location)[/COLOR] facing Default building facing degrees) else do (Do nothing)

Red = Point leak
Green = Unit group leak
Blue = Region (Rect) leak

Proper way of removing the leaks:
Trigger:
  • Set TempPoint = ((Picked player) start location)
    • Set TempRect = (Region centered at TempPoint with size (384.00, 384.00))
    • Set TempGroup = (Units owned by (Picked player) of type Tier Zero (foots))
    • If ((TempRect contains (Random unit from TempGroup)) Equal to True) then do (Unit - Create 1 Footman (Tier 0) for (Picked player) at TempPoint facing Default building facing degrees) else do (Do nothing)
    • Custom script: call RemoveLocation(udg_TempPoint)
    • Custom script: call DestroyGroup(udg_TempGroup)
    • Custom script: call RemoveRect(udg_TempRect)


Note: Freehanded...
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
WTF 3 fing leaks. Omg im killing this
Trigger:
  • Spawn Footmen Faster
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set TempPoint = ((Picked player) start location)
          • Set TempRect = (Region centered at TempPoint with size (384.00, 384.00))
          • Set TempGroup = (Units owned by (Picked player) matching (((Matching unit) is A town-hall-type unit) Equal to True))
          • -------- Barracks-> Footman --------
          • If ((TempRect contains (Random unit from TempGroup)) Equal to True) then do (Unit - Create 1 Footman (Tier 0) for (Picked player) at TempPoint facing Default building facing degrees) else do (Do nothing)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call DestroyGroup(udg_TempGroup)
          • Custom script: call RemoveRect(udg_TempRect)

Leakless?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
WTF 3 fing leaks. Omg im killing this
Trigger:
  • Spawn Footmen Faster
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set TempPoint = ((Picked player) start location)
          • Set TempRect = (Region centered at TempPoint with size (384.00, 384.00))
          • Set TempGroup = (Units owned by (Picked player) matching (((Matching unit) is A town-hall-type unit) Equal to True))
          • -------- Barracks-> Footman --------
          • If (((Region centered at ((Picked player) start location) with size (384.00, 384.00)) contains (Random unit from (Units owned by (Picked player) of type Tier Zero (foots)))) Equal to True) then do (Unit - Create 1 Footman (Tier 0) for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Do nothing)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call DestroyGroup(udg_TempGroup)
          • Custom script: call RemoveRect(udg_TempRect)

Leakless?

You need to use them too... XD

Wow regions leak too? Didn't know that. Good to know.

They sure do :p
 
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