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

Ordering all units in rect containing triggering unit

Status
Not open for further replies.
Level 5
Joined
Oct 7, 2005
Messages
102
Guys I'm having trouble constructing a trigger that selects all the units within the same rect as the triggering unit.

There's probably something easy that I'm missing but I've given up looking. Can any of you please figure this out for me?

Thanks a lot guys.
 
  • Melee Initialization
    • Events
    • Conditions
    • Actions
      • Set point = (Position of (Triggering unit))
      • -------- the 100s represent the size of the region --------
      • Set rect = (Region centered at point with size (100.00, 100.00))
      • Set unitgroup = (Random 11 units from (Units in rect matching (((Triggering unit) Not equal to (Matching unit)) and ((Owner of (Triggering unit)) Equal to (Owner of (Matching unit))))))
      • Selection - Select unitgroup for (Owner of (Triggering unit))
      • Selection - Add (Triggering unit) to selection for (Owner of (Triggering unit))
      • Custom script: call RemoveLocation(udg_point)
      • Custom script: call RemoveRect(udg_rect)
      • Custom script: call DestroyGroup(udg_unitgroup)
:D
 
Status
Not open for further replies.
Top