Leak Question

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
Hey there, team!

I was wondering about leaks. Here's an example:

[parse]
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Gamble[56] Equal to 1
    • Then - Actions
      • Set AotSMemPt = (Center of AotS_Region[Gamble[55]])
      • Unit - Create 1 AotS_BasicBoss1[AotS_HeroGroupSize] for Player 11 (Dark Green) at AotSMemPt facing Default building facing degrees
      • Unit Group - Add (Last created unit) to AotS_BossSquad
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AotSWaveNumber Greater than or equal to 8
        • Then - Actions
          • Unit - Create (AotSDangerLevel[AotSPartInt] x (3 / 2)) Underseer 1 Boss for Player 11 (Dark Green) at AotSMemPt facing Default building facing degrees
        • Else - Actions
          • Do nothing
      • Set MemSaverUGroup = (Last created unit group)
      • Unit Group - Pick every unit in MemSaverUGroup and do (Unit Group - Add (Picked unit) to AotS_BossSquad)
      • Custom script: call DestroyGroup(udg_MemSaverUGroup)
      • Custom script: call RemoveLocation(udg_AotSMemPt)
    • Else - Actions
      • Do nothing


My question is this:
Can you successfully use a point multiple times in the same instance before removing it?
I have a map that dooms itself to failure and crashes at a certain point, despite my (at least, I THINK I have it right) leakproofing.
 

Ayanami

칼리
Reaction score
288
Well yes, there shouldn't be any problem with using point multiple time at the same instance.
 

Laiev

Hey Listen!!
Reaction score
188
Just remove Do Nothing to warcraft don't need to read one more line in trigger, the default action of no line is do nothing.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You can't set a group to (Last created unit-group) since you haven't created one:
Trigger:
  • Set MemSaverUGroup = (Last created unit group)
    • Unit Group - Pick every unit in MemSaverUGroup and do (Unit Group - Add (Picked unit) to AotS_BossSquad)


And remove all the "Do Nothing"s and show us the whole trigger :D
 

vypur85

Hibernate
Reaction score
803
Code:
Unit - Create (AotSDangerLevel[AotSPartInt] x (3 / 2)) Underseer 1 Boss for Player 11 (Dark Green) at AotSMemPt facing Default building facing degrees

It's not a good idea to divide integer numbers. 3/2 will always return as 1. So it's quite pointless to do that.


> (Last created unit-group)

If you create more than 1 unit using 'Unit - Create unit', the created units are considered 'Last created unit group'. So that is fine.


The trigger seems fine to me. No leaks.
 
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