Miarmy Crowd Simulation Documentation (English)

Script Place Node

We can arrange the place node by procedural methods.

Using MEL or Python script, we can access and modify the place node data directly and easily.


Instructions

To achieve script in place node, first we need to set the place type to custom for a place node



Switch to "custom" mode

Transformation Info

<place node>.placement[<unit id>].agentPlace[<infomation>]

  • <place node>: the shape node name of place node
  • <unit id>: the Nth agent unit
  • <information>: from 0 to 7 stand for:
    • 0:Agent Type ID
    • 1:Translate X
    • 2:Translate Y
    • 3:Translate Z
    • 4:Rotate X
    • 5:Rotate Y
    • 6:Rotate Z
    • 7:Color ID

Example:

Line1: get the agent type from unit 0 of McdPlace2 node
Line2: set the translate X to unit 0 of McdPlace2 node

Parent Info

You can also specify each agent parent:
<place node>.parentSet[<unit id>]
Example:

Line3: set the parent for unit 0 of McdPlace2 node

Real Example

You can refer it from the placeStatium.txt in the <Miarmy Directory>/samples (the same place of the samples)

This code can place stadium:



After executing the code in above, the result will be:

The result of stadium placement







Basefount Technology