• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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