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

[Trigger] Number of Units in Rect

Status
Not open for further replies.
Level 36
Joined
Mar 15, 2006
Messages
7,945
How do I get WEU to count the number of units in a rect and act on it? I'm making a leaderboard, and I want it to show the number of units in each players spawn area. Basically, the less units in the rect, the better you're doing. How could I make this? I can't find any triggers to do with the number of units in a rect. Also just as a note, the units are created inside the rect, they don't walk into it, if that makes any difference.

Thanks in advance :grin:
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Unit - Count Units in Unit Group (this is under Integer)

The Unit Group would be Units in (Rect) (add any conditions/junk)

Don't forget to clean up the leaks!

Ex trigger; (uses a Group called MyGroup, and an integer called MyInt)

  • Something
    • Events
      • Something
    • Conditions
      • Something
    • Actions
      • Set MyGroup = (Units in (Playable Map Area))
      • Set MyInt = (Number of Units in MyGroup)
      • Custom script: call DestroyGroup( udg_MyGroup )
 
Status
Not open for further replies.
Top