• 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] Unit Group Issue Order

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
  • Unit - Create 20 Rock Golem (Next Wave 4) for Player 12 (Brown) at SouthWave_AttackingPoint facing 90.00 degrees
  • Unit Group - Order (Units in Marathon 4 <gen>) to Attack-Move To (Center of Castle <gen>)
I created 20 units, and i want all of them to be ordered to move, but the action can move maximum of 12 units. How can I make it moves all of the units?
 
Level 11
Joined
May 8, 2009
Messages
275
As far as I know you can't increase the number of units (12) for a grouped movement (units who stay in formation).
You could divide your 20 units into 2 groups of 10.
  • Unit - Create 10 Rock Golem (Next Wave 4) for Player 12 (Brown) at SouthWave_AttackingPoint facing 90.00 degrees
  • Set UnitGroup1 = (Units in Marathon 4 <gen>)
  • Set Point = (Center of Castle <gen>)
  • Unit Group - Order (UnitGroup1) to Attack-Move To (Point)
  • Unit - Create 10 Rock Golem (Next Wave 4) for Player 12 (Brown) at SouthWave_AttackingPoint facing 90.00 degrees
  • Set UnitGroup2 = (Units in Marathon 4 <gen>) matching (matching unit is in UnitGroup1 equal to false)
  • Unit Group - Order (UnitGroup2) to Attack-Move To (Point)
  • Custom script: call RemoveLocation (udg_Point)
  • Custom script: call RemoveLocation (udg_SouthWave_AttackingPoint)
  • Custom script: call DestroyGroup (udg_UnitGroup1)
  • Custom script: call DestroyGroup (udg_UnitGroup2)
Or pick every unit one by one and order them to attack move:
  • Unit - Create 20 Rock Golem (Next Wave 4) for Player 12 (Brown) at SouthWave_AttackingPoint facing 90.00 degrees
  • Set UnitGroup1 = (Units in Marathon 4 <gen>)
  • Set Point = (Center of Castle <gen>)
  • Unit Group - Pick every units in (UnitGroup1) and do (Actions)
    • Loop - Actions
      • Unit - Order (Picked Unit) to Attack-Move To (Point)
  • Custom script: call DestroyGroup (udg_UnitGroup1)
  • Custom script: call RemoveLocation (udg_Point)
  • Custom script: call RemoveLocation (udg_SouthWave_AttackingPoint)
*don't forget to remove leaks*
 
Status
Not open for further replies.
Top