Miarmy Crowd Simulation Documentation (English)

Slave Control (Combo)

 

119 Combo Agent (Go to Video Tutorials)

 

Introduction

In previously part, we introduced the Master Logic (See more on Master Perception (Input)). And the Slave Logic and Combo Agents are the extension of that.

Master sentences work on the slave agents and make the slave agents detect and interactive with master agents, whereas slave sentences let master agents directly operate slave agents, make the slave agents attach to its bone or enable slave agents dynamics.

 

Firstly, we need establish the master-slave relationship between agents.

Note: If you don't know the master-slave relationship, please read on Master Perception (Input).

master / slave relationship

Please take a look at the above picture, agents type B are the slave of agents type A,

  • Master sentence works on agent type B, and B type agents can use master sentences detect master and feel where is the A type agent
  • Slave sentence works on agent type A, and A type agents can directly operate B type agents, make it attach A's specific bone or enable dynamics.

 

Note: We usually establish this relationship by "Post Place" callback (read more on Callback Script Functions)

post place callback script

 

Slave Sentence Examples

We can use slave sentences achieve the combo agent easily, and the combo agents are sometimes very useful and flexible in production, here we listed some examples for your referencing:

  • Agents are able to grab different types of weapons and shields, the weapons and shields are slave agents.
  • Horse riders, riders can be slave of horses, and they can be operated by 2 sets of logic and action tree and act separately. For example, horse can run/stop and avoid each other, and rider can perform different actions based on the users control
  • Bi-head Orc creature, different heads can use different logic set and make simulation very interesting.

 

Usage

Each slave has only one master, however, one master maybe has several slaves, so each one of slave has an ID. Such as a fighter has 2 slave agents, shield and sword.

We usually use slave sentences make that slave agent attach to bone. And combine them into a new agent.

Spear agents follow men agents by slave sentences

 

Double head agents

 

Slave Sentences

Slave

  • my slave follow my bone:??
  • my slave follow my bone:?? with offset:(0,0,0,0,0,0)
    (note: offset stands for tx, ty, tz, rx, ry rz)
  • enable dynamics for my slave

 

  • my slave[?] follow my bone:??
  • my slave[?] follow my bone:?? with offset:(0,0,0,0,0,0)
    (note: offset stands for tx, ty, tz, rx, ry rz)
  • enable dynamics for my slave[?]

 

 

 

 

 

Basefount Technology