• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Does this trigger leak?

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2012
Messages
116
Hello! Does this trigger leak?

  • SkeletonWarriorBottom
    • Events
      • Time - SkeletonWarrior expires
    • Conditions
    • Actions
      • Unit - Create (6 + ((AmountOfPlayers - 1) x 2)) Skeleton Warrior for Player 7 (Green) at (Center of BottomAttack <gen>) facing Default building facing degrees
      • AI - Ignore (Last created unit)'s guard position
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Gate (Horizontal) 0000 <gen> is dead) Equal to True
        • Then - Actions
          • Unit Group - Order (Units in BottomAttack <gen> owned by Player 7 (Green)) to Attack-Move To (Center of GateAttack <gen>)
        • Else - Actions
          • Unit Group - Order (Units in BottomAttack <gen> owned by Player 7 (Green)) to Attack Gate (Horizontal) 0000 <gen>
 
  • SkeletonWarriorBottom
    • Events
      • Time - SkeletonWarrior expires
    • Conditions
    • Actions
      • set TempLoc = (Center of BottomAttack <gen>)
      • Unit - Create (6 + ((AmountOfPlayers - 1) x 2)) Skeleton Warrior for Player 7 (Green) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
      • AI - Ignore (Last created unit)'s guard position
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Gate (Horizontal) 0000 <gen> is dead) Equal to True
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • set TmpLoc = (Center of GateAttack <gen>)
          • Unit Group - Order (Units in BottomAttack <gen> owned by Player 7 (Green)) to Attack-Move To TmpLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Order (Units in BottomAttack <gen> owned by Player 7 (Green)) to Attack Gate (Horizontal) 0000 <gen>
It did, now it doesn't. However, it won't work as intended, as only one of the created units gets its guard position removed.
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Apo, you can use this ;p
(Last created unit) -> (Last created unit group)

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Last created unit group) and do (Actions)
      • Loop - Actions
        • -------- ACTIONS HERE --------
You can even save (Last created unit group) to a Unit Group variable and destroy them later (call DestroyGroup(udg_YourVariableName))
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Apo, you can use this ;p
(Last created unit) -> (Last created unit group)

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Last created unit group) and do (Actions)
      • Loop - Actions
        • -------- ACTIONS HERE --------
You can even save (Last created unit group) to a Unit Group variable and destroy them later (call DestroyGroup(udg_YourVariableName))
I know all of that, but I don't get the point of that info :p.
 
Status
Not open for further replies.
Top