• 🏆 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!

[Pick Every Unit] Not working

Status
Not open for further replies.
My trigger for the map is supposed to pick every unit of a type and then move it forward in a point with polar offset...
it only works for player 1 but then the units owned by other players don't work. Could you please tell me why this is?

[Trigger:

  • MoveLightning
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Lightning Ball) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Arena <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Set TempLoc = (Position of (Picked unit))
              • Unit - Move (Picked unit) instantly to (TempLoc offset by LightningSpeed towards (Facing of (Picked unit)) degrees)
              • Custom script: call RemoveLocation(udg_TempLoc)
            • Else - Actions
              • Do nothing
EDIT:

Custom script: set bj_wantDestroyGroup = true
That was my anti-leak trigger
I found out that the above script destroys the group. Now i need to know if this will work without leaks:

  • MoveLightning
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units of type Lightning Ball) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Arena <gen> contains (Picked unit)) Equal to True
                • Then - Actions
                  • Set TempLoc = (Position of (Picked unit))
                  • Unit - Move (Picked unit) instantly to (TempLoc offset by LightningSpeed towards (Facing of (Picked unit)) degrees)
                  • Custom script: call RemoveLocation(udg_TempLoc)
                • Else - Actions
                  • Do nothing
 
Last edited:
Status
Not open for further replies.
Top