According to species and circumstances, details of the shape of the grex and how it may form will vary but typically the stressed amoebae first produce pheromones that stimulate the flock to vertically assemble in a column. When the column of aggregated cells becomes too high and narrow to stay upright, it topples and becomes a slug-shaped mass: the grex.
Depending on species and conditions, the shape of the grex and its formation can differ; however, generally, stressed amoebae initially release pheromones that cause the flock to vertically organize into a column. When this column becomes too high and narrow, it collapses and transforms into a slug-like mass: the grex.