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

How to Kill/Remove all building at range

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
How if i Kill a Unit then all building at range

How if i Kill a Unit then all building at range 500 for an example?

Please help me ;) :wink: thanks you
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Add the event and then you might have to change that Temp_Loc_1 = ... to something that matches the event.

  • Untitled Trigger 105
    • Events
    • Conditions
    • Actions
      • Set Temp_Loc_1 = (Position of (Target unit of ability being cast))
      • Set Temp_Group_1 = (Units within 512.00 of Temp_Loc_1)
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
 
Level 6
Joined
Mar 9, 2009
Messages
175
How to... if i kill a units then make all nearby building destroy/kill ..
 
Last edited:
Level 8
Joined
Jan 8, 2010
Messages
493
add an if/then/else to the trigger Maker gave you.

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set Temp_Loc_1 = (Position of (Target unit of ability being cast))
      • Set Temp_Group_1 = (Units within 512.00 of Temp_Loc_1)
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A structure) Equal to True
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
 
Status
Not open for further replies.
Top