• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,240
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