• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Two Questions on Unit Groups

Status
Not open for further replies.
Level 4
Joined
May 20, 2011
Messages
59
Hey Guys,
How do you create a Unit Group through a Custom Script/JASS? And also, is it possible to check if a Unit Group is Empty and if so how would both of these things be accomplished through Triggers? Thanks so much!
Cordially,
Adorm
 
This creates an empty group:
JASS:
local group g = CreateGroup()
If you want to pick units in range of a point you can use:
JASS:
call GroupEnumUnitsInRange(g,x,y,radius,null)
To check if group g is empty you can check:
JASS:
if(FirstOfGroup(g)==null) then

endif
 
This creates an empty group:
JASS:
local group g = CreateGroup()
If you want to pick units in range of a point you can use:
JASS:
call GroupEnumUnitsInRange(g,x,y,radius,null)
To check if group g is empty you can check:
JASS:
if(FirstOfGroup(g)==null) then

endif
Is it possible to check if the group is empty through a normal GUI Function?
 
Status
Not open for further replies.
Back
Top