Driving module attributes with metadatas
Now let's have a look at how you can drive module attributes with metadatas.
Create an agent group. Add a gridLayout module. Set the "size" field to (3,1,3). Then add a stateMachine module and set the state to 1. From the Settings section change the display type from skeleton to skin.
Draw a curve in the viewport and add a "followCurve" module to the agent group.
Then set the curve in the "curve" attribute of the module.
Press play and see the agents following the curve.
Add an "AddMetadata" module, then type in the name field "followCurve@curveWeight" (this name follows the naming convention "BEHAVIOUR_MODULE_NAME@ATTRIBUTE_NAME").
Set the type to double and the default double value to 1.0.
Open the override dialog for the double value attribute, select the rows 6 to 8 and set their value to 0.
Rewind and press play, three agents should now ignore the given curve.
Copyright © 2017, Toolchefs LTD.