Behavior Triggers

Triggers are built-in and atomic action events which can be combined together with Trigger Operators to create more advanced action events (this combination is called Trigger Graph).

The Trigger Graph can be executed by a Behavior to control their start and stop conditions. They are used to make Entities react to various events, such as an entity entering in a predefined zone, or being at a given distance of something else.

You can edit them with the Trigger Editor by double-clicking on left (start) or right (stop) arrow-like shapes in each behavior, highlighted in yellow here :


Behavior Start / Stop Triggers shortcuts in BehaviorEditor

Note that most often it is useless to create a Trigger manually because two trigger containers will be automatically created when creating a Behavior

Triggers

Random enables to start or stop a behavior randomly depending on percentage at each call.
Current Frame

enables to start or stop a behavior by returning true if the current frame is successfully compared to a reference value.

Polygon Zone enables to start or stop a behavior by returning true when the position of the root bone of an Entity is contained in a polygon zone (the polygon zone being represented by a Maya polygon) or a group of polygons. 
Painted Zone

enables to start or stop a behavior by returning true when the position of the root bone of an Entity is contained in a painted zone of a specified color.

Distance

enables to start or stop a behavior by returning true when the distance between the root bone of an Entity and an object (camera, mesh…) or a group of objects, is successfully compared to a reference value.

Driven Attribute

enables to start or stop a behavior by returning true if any Maya object attribute is successfully compared to a reference value. 

PPAttribute

enables to start or stop a behavior by returning true if a per-particle field is successfully compared to a reference value.

Expression

enables to start or stop a behavior by returning true if the evaluation of an Expression or a Channel is successfully compared to a reference value.

Behavior Time

enables to stop a behavior by returning true when a behavior has been running for a certain amount of time.

Motion Time

enables to stop a behavior by returning true when a motion behavior (Motion Behavior , Locomotion BehaviorSynchronized Motion Behaviorhas been running for a certain amount of time.

Script Command enables to start or stop a behavior by returning true when the MEL or Python command returns a value different than 0. 
Physics Collision enables to start or stop a behavior when a collision with another physicalized entity or a Crowd Rigid Body occurs.
Boolean always return the same value (true or false).
Fade delay the perfom of  Triggers attached to a Behavior thanks to the Ramp.

Trigger Operators

And perform a AND logical operator between previous connected Triggers results.
Or perform an OR logical operator between previous connected Triggers results.
Xor perform an XOR logical operator between previous connected Triggers results.
Not return the negation of the result of the previous Trigger.