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

[Solved] Need help with unit group

Status
Not open for further replies.
Level 8
Joined
Jul 17, 2004
Messages
283
What I want to do is,

I want to add 5 specific units to a unit group. Then I want to order a unit outside of that unit group to attack a random unit from the unit group. If a unit is dead inside the unit group, I want them removed from it. How can I do this?
 
Level 5
Joined
May 12, 2013
Messages
70
Event :
Map Initialization
Condition
Action :
Set UnitGroup = Units in Reg001 / Units of type / Units Matching Condition / Units owned by Player

------------

Event :
Time - Elapsed game time is 1.0 seconds
Condition
Action :
Unit - Order XYZ (Select Unit) to attack Random Unit from UnitGroup

-----------------

Event :
Unit- A unit Dies
Condition :
((Dying Unit) is in UnitGroup Equal to True
Action :
Unit Group - Remove dying unit from UnitGroup
 
Status
Not open for further replies.
Top