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

Unit group movement

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
When you have a group of units and order them to move they will spread out but for what I'm making I'd want them to have the built in "formations" but stay closer too each other.

Think something like those Roman turtle formations with their phalthernax or w/e standing next to each other with shields raised forming human walls.

I thought that maybe I could use the thing that make air units separate but with a negative value to pull them closer, although that's only when they stand still i think.

Edit: Found something interesting, while looking aroundhttp://www.youtube.com/watch?v=vdX1x3RBd8I
 
If you want the units to move like in the video (which is quite cool) you need to trigger the whole thing.
When, what I assume is some kind of leader/commander, moves you need to order the rest of the units to move to points (set in triggers) according to the position of the move-order of the leader.

You need the point from where the leader is when the order is issued and the target point of that order.
Then calculate the angle.
When you have those numbers you can further calculate the positions of the rest of the units.
You might want to set all the units in the group/squad to a unit array for easy reference.
Fx. Issue Unit_Array [1] to move to position with XXXX offset...
And so on.
 
Status
Not open for further replies.
Top