The Crowds structure provides the following methods affecting the character studioCrowd feature:
Equivalent to clicking Solve in the crowd’s Solve rollout..solve starts the solving, based on all other current crowd parameter settings.
Equivalent to clicking Generate Clones in the Scatter Objects dialog, Clone tab, displayed by clicking the Scatter Objects icon. Generates clones based on all other current crowd parameter settings.
Equivalent to clicking Generate Locations in the Scatter Objects dialog, Position tab, displayed by clicking the Scatter Objects icon. Generates locations based on all other current crowd parameter settings.
Equivalent to clicking Generate Orientations in the Scatter Objects dialog, Rotation tab, displayed by clicking the Scatter Objects icon. Generates rotations based on all other current crowd parameter settings.
Equivalent to clicking Generate Scales in the Scatter Objects dialog, Scale tab, displayed by clicking the Scatter Objects icon. Generates scales based on all other current crowd parameter settings.
Equivalent to clicking Scatter button in the Scatter Objects dialog, All Ops tab. Scatters objects based on all other current crowd parameter settings.
Equivalent to clicking Align Objects with Delegates in the Object / Delegates dialog displayed by clicking the Associate Objects with Delegates icon. Aligns objects based on all other current crowd parameter settings.
Equivalent to clicking Link Objects to Delegates in the Object / Delegates dialog displayed by clicking the Associate Objects with Delegates icon. Links objects based on all other current crowd parameter settings.
Equivalent to clicking Assign Delegate Controllers to Objects in the Object / Delegates dialog displayed by clicking the Associate Objects with Delegates icon. Assigns controllers based on all other current crowd parameter settings.
Equivalent to clicking OK in the Smoothing dialog displayed by clicking the Smooth Paths button in the Solve rollout. Smooths objects motions based on all other current crowd parameter settings.
Equivalent to clicking Proximity to a Grid / Assign in the Priority rollout. Assigns priorities to the delegates specified in <Crowd.priority>.delegates based on their distance from the grid specified in <Crowd.priority>.grid.
Equivalent to clicking Proximity to an Object / Assign in the Priority rollout. Assigns priorities to the delegates specified in <Crowd.priority>.delegates based on their distance from the object specified in <Crowd.priority>.object.
Equivalent to clicking Assign Random Priorities in the Priority rollout. Assigns random priorities to the delegates specified in <Crowd.priority>.delegates.
Equivalent to clicking Make Priorities Unique in the Priority rollout. Ensures that the priorities of the delegates specified in <Crowd.priority>.delegates are unique. If two delegates share the same priority, one of them will be given a new priority.
Equivalent to clicking Increment Priorities in the Priority rollout. Increments the priorities of the delegates specified in <Crowd.priority>.delegates by the value in <Crowd.priority>.increment.
The crowd function needs two parameters defined. The 1st parameter passed in is the current crowd and the 2nd parameter passed in is the solve frame.
You can perform the following MAXScript operations:
on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.
<Crowd>.behaviors-- array of Behavior objects <Crowd>.teams-- array of CrowdTeam objects <Crowd>.assignments-- array of Assignment objects <Crowd>.cogcontrols-- array of CognotiveController objects <Crowd.scatter>.ObjectsToScatter-- node array <Crowd.objAssoc>.objects-- node array <Crowd.objAssoc>.delegates-- node array <Crowd.smooth>.objects-- node array
If you delete a team or a cognitive controller via MAXScriptdeleteitem$crowd01.teams[1] 1 or deleteitem$crowd01.cogcontrols[1] 1, it may still be referenced by some assignments. Nothing will go wrong, but it's a strange thing to do and one probably should not do it.