A Parallel Operator (beOpParallel) is used to process several Behaviors in the same time. This operator handles children behaviors (added by drag'n drop on the Parallel Operator), but it can only contain Behavior Containers and built-in Behaviors (not Behavior Operators).
An empty Parallel Operator
A Parallel Operator containing two Behaviors
When the Parallel operator is evaluated, it first starts all the children Behaviors and then keeps running until all or one of the children have stopped (according to a given exit mode).
- Behavior Editor / Behavior Library:
Behavior Editor Workspace: drag and drop a Behavior Container or a built-in Behavior on another built-in behavior
Parallel Operator automatic creation using Behaviors drag'n drop
- Golaem Menu: Crowd Behaviors / Operators / CrowdBeOp Parallel Node
- MEL command: glmCrowdBeOpParallelCmd;
Define the mode to use to stop the Parallel Operator, based on the state of its children Behaviors:
|Exit Behavior||Select the Behavior used to stop the Parallel Operator. This attribute is only available with the "When a specific behavior has ended" exit mode.|
|Children||List the Behaviors contained in the Parallel Operator. This attribute is read-only and can not be edited (use the Behavior Editor workspace to add or remove Behaviors in a Parallel Operator).|
The following example describes a Parallel Operator used to animate an Entity by playing a Walk animation (using a Motion Behavior) and looking at its feet (using a LookAt Behavior) in the same time, then playing an "Idle" animation (also using a Motion Behavior). Considering that the "Walk" Behavior stops after a given a duration and the "LookAtFeet" Behavior has no Stop Trigger, it is necessary to set the "As soon as one behavior has ended"exit mode of the Parallel Operator in order to run the "Idle" Behavior; otherwise, if using the "When all behaviors have ended" exit mode, the LookAtFeet Behavior will keep running and the "Idle" Behavior will never start (so the entity will be looking at his feet without playing any animation).
To keep the entity looking at his feet wile playing Walk then Idle animations, it is necessary to run the LookAtFeet Behavior in parallel with a Behavior Container which handles both Walk and Idle animations.