Cognitive Controller Editor
Bottom of the Page

Create panel (Helpers) Object Type rollout Crowd Setup rollout (Cognitive Controllers)

Select a Crowd object. Modify panel Setup rollout (Cognitive Controllers)

The Cognitive Controller editor lets you combine behaviors into states. More important, it lets you sequence different behaviors and behavior combinations using state diagrams, where conditionals written in MAXScript impose changes in behavior.

For example, you can specify that a character or object is to wander aimlessly until it comes within a certain distance of another object, whereupon it heads straight for that object. Or you can specify that one character is to avoid another only when the second character is avoiding the first.

NoteThe MAXScript conditionals used in the cognitive controller typically consist of a single line of code. You can load and save them separately as .ms files, but they are also stored within the .max scene file in which they reside.

The editor interface consists of an icon-based toolbar above a window that contains the state diagram. When you first open the editor, no state diagrams exist. Begin by clicking the New button to create a new state diagram.

TipIf you find yourself consistently assigning two or more behaviors to delegates or teams, you can save time by combining the behaviors into a single-state cognitive controller, or "behavior module," and assigning that instead. The only disadvantage is that you can't animate the weights of behaviors used in the cognitive controller, but you can work around that by using transitions.
NoteCrowd doesn't let you use multiple cognitive controllers with a delegate. You can assign them, but when you solve, character studio notifies you that it will use only the first assigned cognitive controller.
See Also


Create State

Lets you create new states in the diagram. Click this button, and then click in the state diagram area to add states. A state appears as a rectangular box containing the name of the state.

The first state you add is, by default, the first state in the controller that executes when the simulation is run. This is indicated by its red color; states you add subsequently are colored blue. To set a different state to execute first, use the Set Start State function.

You specify a state's name and behaviors by editing the state. To edit a state, right-click it. This opens the State dialog.

Create Transition

Lets you link states with transitions. Click this button, and then drag between two states to create the transition, starting with the earlier state. The transition appears as a black arrow pointing from the first state to the second. Alternatively, if you click a state with the Create Transition tool active, you create a transition that loops back to the state itself.

Right-click a transition to specify its characteristics and conditions by editing the transition. This opens the State Transition dialog.

Set Start State

Normally the state that executes first in a cognitive controller is the one that was added first. Use this tool to choose a different state to execute first. The start state is red; the rest are blue.

Typically you would use this when you have a circular sequence of states, and you want to change which state executes initially.

Move State

Lets you move states around in the window by dragging them.

Select State/Transition

Lets you select states and transitions for subsequent deletion. Selected states have white outlines, and selected transition lines are white.

You can select multiple states by dragging a box around them. You can select multiple states and transitions by holding the Ctrl key as you click.

Delete State/Transition

Lets you delete one or more states or transitions. First select any combination of states and transitions to delete, and then click this button.


Shows the name of the current state diagram. To display and/or edit another, choose it from the list.

To change a state diagram's name, click the name in the box and use the keyboard to edit the text.


Adds a new cognitive controller. By default, cognitive controllers are named “Cognitive Controller” followed by a number, but you can change this to anything you like.


Deletes the current cognitive controller. This is an undoable operation.