Flock task agents

Is it possible to define the agent list members on runtime, add or remove agents?

For example when agent enters a trigger area it gets added to Flock task's agent list?
 
The list of agents is a SharedGameObject[] so you can assign new values with the shared variable system. Ensure that the flock task is not active at the same time you assign the new agents otherwise it won't pick up those changes.
 
I see there's "Set shared object list" and "Set shared object" tasks. Can I use these Tasks to se the Flock task's agent list?
 
SharedObjects are different from SharedGameObjects so you can't use those tasks. The best route is to have a managing script that adds/removes the agents through SetVariableValue when an event occurs.
 
Top