Behavior Container

A CrowdBeContainer contains a set of behaviors and operators. This node may be mapped on an Entity Type.
 
A Behavior Container in the behavior editor
 
It consists at least of:
  • A unique entry point called initial behavior
  • A unique exit point called final behavior.
 
Default Behavior Container
 
Behaviors and Operators can be added to a Behavior Container and connected to each other. The Behavior Container is the only node which can be mapped to an Entity Type but it can be shared between different Entity Types.
 
Notice that sharing the same Behavior Container, does not necessarily mean that all the Entities of an Entity Type will move in the same way. Operators and Triggers can be configured in various ways to add some diversity.
 

Creating a Behavior Container can be performed through the following options:

  • Behavior Editor / Behavior Library: 
  • Crowd Menu: Crowd Behaviors / CrowdBeContainer Node
  • MEL command: glmCrowdBeContainerCmd;
Notice that when creating an Entity Type, a Behavior Container will be automatically created and connected.
 
Connection between a Behavior Container and an Entity Type
 

Configuration

A Behavior Container defines the following attributes.
 
Notice that those following attributes are automatically set by the Behavior Editor when behaviors are added, deleted or modified.
 

Container Attributes

Container attributes of a Behavior Container
 
Children Behaviors and Operators contained in this Behavior Container
Start with The next Behavior or Operator of the initial Behavior (e.g. the Behavior/Operator connected to its unique outgoing behavior), this behavior must be a child of the CrowdBeContainer
Finish with Behaviors and Operators previous to the final Behavior. Behavior and Operator can be added with the "+" button and remove with the "-" one. These behaviors must be children of the Behavior Container.

Sequence Attributes

Sequence attributes of a Behavior Container
 
Parent Behavior The Behavior Container can be added to another Behavior Container, a Parallel Operator and a NoOrder Operator. This attribute allows selecting the parent of the current Behavior Container
Next Behavior The current Behavior Container can be followed by one of the parent behavior's children. This attribute allows selecting the behavior following the current one.