• 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.

Moving Units but not buildings

Status
Not open for further replies.
Level 7
Joined
Jul 25, 2008
Messages
292
  • GateTree
    • Events
      • Player - Player 1 (Red) types a chat message containing -GateTree as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 18)) Equal to -GateTree
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 512.00 of (Position of StarGateItem 0783 <gen>)) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Position of StarGateItem 0763 <gen>)
        • Else - Actions
          • Do nothing
Any idea on how to edit this so it will ONLY move units/heros but not buildings?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Pick units in range matching condition: Matgchin unit is a structure equal to false.

EDIT:
  • Untitled Trigger 091
    • Events
    • Conditions
    • Actions
      • Set point = (Position of *item*)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 512.00 of point matching (((Matching unit) is A structure) Equal to False)) and do (Actions)
        • Loop - Actions
          • *Actions*
      • Custom script: call RemoveLocation(udg_point)
The first custom script gets rid of the unit group leak, it destroyd the unit group that is created by using the unit group pick.

The point is a point variable, and using it will get rid of the location leak.

http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Status
Not open for further replies.
Top