Quick Trigger Question

Malkoth

New Member
Reaction score
1
Hey :)
Can anyone please tell me if this trigger is leakless?
Trigger:
  • Amplify Magic Check
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Amplify Magic ) Equal to False
            • Then - Actions
              • Unit - Remove AM 3 from (Picked unit)
              • Unit - Remove AM 2 from (Picked unit)
              • Unit - Remove AM 1 from (Picked unit)
            • Else - Actions
              • Do nothing
 

Happy

Well-Known Member
Reaction score
71
im not sure whether (Units in (Playable map area)) leaks so i always make a unit group and remove it after using...i would do it...this way round you can be sure^^
 

Malkoth

New Member
Reaction score
1
Ah, thanks man, i though you said that it is not leakless. :)
+rep to you guys for helping :))
 

Seprest

New Member
Reaction score
15
It already is leakless. You set bj_wantDestroyGroup = true.


I never really do leak checks for my triggers, is this something I should be doing before I call any unit group?

Does any temporary unit group called in a trigger not get deleted? If so will bj_wantDestroyGroup = true work for me?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, there is NO downside with leak-checking all triggers !
And, it's not just Unit-group that leak (You might already know this though :p) it's Locations, Forces etc...

bj_wantDestroyGroup will work fine ;) Though I believe itäs better prectise to set it to a variable and then destroy it :p Since if you want to write efficient, you use JASS, and also don't use BJ's :p

But that's another subject ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top