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

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