• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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