Driven Attribute Trigger

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

Creation

  • Behavior Editor / Trigger Library: 
  • Golaem Menu: Crowd Triggers / Triggers / CrowdTri DrivenAttribute Node
  • MEL command: glmCrowdTriDrivenAttributeCmd;

Configuration

A Driven Attribute Trigger defines the following specific attributes. For common attributes see Trigger Common Attributes.

Driven Attribute Attributes

Attribute The driven attribute value: the current value of the linked Maya object attribute;
Operator

A comparison operator (equal, greater than…)

Value

A reference value.

Example

To link a Maya object attribute with the driven attribute:

  • Open the Connection Editor (Window / General Editors / Connection Editor)
  • select the target object in the Outliner
  • click on "Reload Left" in the connection Editor
  • Select the Trigger in the Behavior Editor
  • In the Attribute Editor, make sure the Trigger Shape (not the Transform!!!) is selected and click on Select at the bottom
  • click on "Reload Right" in the connection Editor
  • Make sure that the target object is displayed in the Component Editor Outputs column and that the trigger is displayed in the Inputs column (if not, press the "from->to" / "to->from" button).
  • In the Outputs column, select the wanted attribute to link and, in the Inputs Columns, select drivenAttribute.
  • Now, the driven attribute value field in the trigger will display and be updated with the value of the linked attribute, even if the linked attribute is animated

It can be particularly useful to adapt a behavior to the environment or any event in Maya. E.g. one could create an explosion particle system, link its visibility attribute to a flee behavior. Then, when the explosion object will be displayed, the entities will flee from it.