[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