Using an AdaptPosition Behavior

A very easy way to create and drive an army formation is to constrain it to a Maya geometry.

Initial Placement

1. Create a new scene.
2. Click on the terrain icon  and leave the default settings.
3. Create a new EntityType  and load the fortress man from the samples (don’t forget to add the RenderingType for render previz)
4. Create a pPlane and shape it to your will as we are going to create the entities on each vertices.
5. Go into the Population Tool settings. Select your pPlane vertices using the Maya component mode selection and click on the Population Tool "Create Particles On Selection Or Components" .
6. Click on the Create button in the Population Tool attribute editor in order to create a particle system and link it to a Crowd Field. Your formation is now placed.

Stick them on the geometry

7. Open the Behavior Editor  and double-click on your EntityType.
8. Drag and Drop an Adaptat Position Behavior   in the Behavior flow. 
9. Edit the Behavior attributes to map the creation Geometry pPlane  as a Target object. Set the Position Mode to Absolute and the component mode to Vertices.
10. In order to be able to play some other Behavior after this one edit its end Trigger and set it to end after 5 frames.
11. The first Behavior allow us to assign entities to a vertice. In order to make your crowd move, we are going to drive the particles on the vertices of your pPlane. Drop another Behavior AdaptPosition  behind the previous one. 
12. Edit its attributes exactly as the previous one but this time set its end Trigger to False.
13. Animate your pPlane, and play your simulation, your entities are now following their assigned vertices.

Make them move

14. Drag and drop a Locomotion Behavior and its motions (or drag and drop a previously saved Locomotion Behavior template) on the second Adapt Position Behavior to create a Parallel Operator. 
15. In this example we are using the Crowdman Locomotion set from the Character pack Locomotion sample scene. In order to play it on a different character than the crowdMan please refer to the Motion Mapping documentation page.
16. Play your simulation, your entities are now playing motions to follow their vertices.

Notice: If your crowds can't stand on their vertices check the Crowd Visual Feedback to know the velocity of the plane and edit your locomotion set accordingly. A locomotion set with only walk motion clips won't be able to follow a very fast particle, add run motion clips to give your locomotion Behavior more velocity availability. Please refer to the Locomotion Documentation page.

Give your Formation a Path

17. Unlike the Formation Behavior your entities are now stuck to a Geometry, in order to animated them animate the geometry. You could for example make this geometry Follow a path or shape it with some Maya deformers.

Add Noise For More Realism

18. You can use the Offset Attributes to add some noise on the character positions
15. You can also use the attributes of the Locomotion Behavior to randomize animation, for example the Start Percent attributes