A crowd behavior plug-in for character studio inherits from the BaseBehavior class found in bhvr.h. A behavior plug-in has a super class of BEHAVIOR_SUPER_CLASS_ID exists in the 3ds Max plug-in directory. The 3ds Max crowd system uses the super class id to find the plug-in as an available behavior.
There are three basic kind of behaviors: force, constraint, and orientation. The type of behavior is queried using the function BaseBehavior::BehaviorType().
Before writing a behavior plug-in it is important to understand the basic algorithm used by the crowd system during a simulation. This algorithm is performed for each delegate each frame. The crowd system always computes on a frame by frame basis, not ticks.
The new position of the delegate isn't set until after all of the forces are calculated for all of the behaviors and all of the delegates.
For a biped crowd, bipeds use goals and not forces to determine which direction they should go in. In order to create a force behavior that will work with a biped, a goal position must be specified. The movement of the biped is then determined by using the goal to select clips found in the motion flow graph.