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.
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.
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.
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.
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.
The State dialog lets you add behaviors to, and remove them from, a cognitive controller state in a crowd simulation, and specify weights for each behavior.
These settings control how character studio effects a transition from one state to another when using a cognitive controller. For more detailed information, see To set up and use a cognitive controller.