• 🏆 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!

Place units in formation

Status
Not open for further replies.
Level 1
Joined
Sep 21, 2014
Messages
7
Hello there,
I'd like to know how I can place a group of unit in formation. I've seen a lot of topics about moving them in formation, I don't care. I have a group of randomly placed unit (pretty close though), and I want to make them move and place in line (side by side, not one behind another).
This is What I want :
YhRnCjd.jpg

I obviously want them to move at the same time, not one by one.
I've tried this :
4VRnh33.png

(This a (half-)French version of the Editor, but I hope it's still pretty understandable)
So my point was to pick a unit in the group, order it to move, remove it from the group, change the point coordinates, and do it again until there's no units left in the group. But it doesn't work (the units are not removed, I was expecting that, but the point coordinates does not change either).

So can my method be corrected? Or is there another better way to do this?

Thank you.
 
Level 25
Joined
May 11, 2007
Messages
4,651
Save the random unit in a variable and use that variable to order the unit to move.
The (ordered unit) only applies to when you use an event with "a unit is ordered" it doesn't react to actions.

This map features formation troop movement, maybe you can ask the author how he made it?
Rome II Total War 1.0
 
Level 1
Joined
Sep 21, 2014
Messages
7
The point cord is set the same evry time

Use temppoint offset by 0.00 -20.00 x integerA
I thought that as in basic programmation, when you do x = x + a in a for loop changes the value of x at each occurence.

@LorDz : if i can't use "ordered unit" tu refer to the random unit, how can I store it in a variable? "Set unit_temp=?"
 
Level 1
Joined
Sep 21, 2014
Messages
7
It's ok I finnally made it work guys, thanks for you help.
Here's the final trigger :
NFxR388.png

As i said previously, I don't need to multiply by integer A, I'm in a for loop so on each turn temp_point is modified.
 
Status
Not open for further replies.
Top