Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Video 092 and Video 093 (Go to Video Tutorials)

...

Assign Maya Attribute by Agent Type

We can use Miarmy > Knowledge Perception > Maya Attribute > Attribute Manager… and select the Agent Group node you want to operate, and then add or edit the maya attribute for this type of agent.

Like the following picture, we add "aaa" and "bbb" attribute to the Agent Type "loco" by Attribute Manager


Image RemovedImage Added
Add 2 maya attribute to the agent type "loco"

...

For creating an Attribute Host, we just need use Miarmy > Knowledge Perception > Maya Attribute > Create Attribute Host, and then we also use Agent Variable manager still need to use Attribute Manager to add/edit the variable on the host node.

Image RemovedImage Added
Create host node and add 2 attributes onto it


For assigning the variable attribute to the agent, we need link it to agent group node or place node. We need to the too called Variable Attribute Connection Editor which at Miarmy > Knowledge Perception > Variables Maya Attribute > Agent Variable Attribute Host Linker.

As the below image shown, the left if the variable attribute host we need select and then edit this link in the Variable Attribute Host Linker. The right-hand side window is the Connection Editor. There are 2 tables, the right one contains the all the agent types and the place nodes inside your open scene, and we can select some of them and click the "<<< Add Link(s)" to the left side. The left side shows the place node or agent type node which already connected to the Host node.

Image RemovedImage Added
Connect host node to agent group or place node


After setting up, based on the above example, when simulation begin the agent type "snake" and also all the agents from "McdPlace0ShapeMcdPlace1Shape" will contain the variables "ccc" and "ddd" and the values are "ccc" between 0 and 10, and "ddd" between -12 and 12.

...