ResourceAttach


Attaches the specified seized resources to the agent. The result is that they will move together with the agent (escort the agent) until they are detached or released. The resources being attached must be already seized and located in the same node as the agent. Obviously, you cannot attach a static resource.

The attachment process takes zero time..

Attached resources are animated near the agent with a certain offset.

Parameters

Attach
Specifies which resources should be attached.
There are three options:
All compatible seized resources - all compatible (i.e. non-static) resource units are attached to the agent.
All units seized in given Seize block(s)
 - You specify the list of Seize blocks, and only the resources previously seized by these blocks will be attached.
Specified resources (list of pools)
- You specify the list of ResorcePool objects, and only the specified resource units will be detached. One unit will be attached per pool name, so if you wish to attach two or more units of the same pool, you should list that pool twice, e.g.: doctors, nurses, nurses
Get value: attachMode
Set new value at runtime: set_attachMode( new value )
Valid values:
All attached resources - ResourceAttach.ALL
                     All attached units seized in given Seize block(s) - ResourceAttach.ALL_FROM_SEIZES
                     Specified resources (list of pools) - ResourceAttach.SPECIFIED_RESOURCES

Seize blocks
[Visible if Attach All units seized in given Seize block(s)] List of Seize blocks. Only the resources previously seized by these blocks will be attached. 
Get value: seizeBlocks
Resource Pool objects [dynamic]
[Visible if Attach:Specified resources (list of pools)] List of ResourcePool objects whose units are being attached. One unit will be attached per pool name, so if you wish to release two or more units of the same pool, you should list that pool twice, e.g. doctors, nurses, nurses.
Local variable: agent - the agent
Actions
On enter [code]
Code executed when the agent enters the object.
Local variable: agent - the agent
On exit [code]
Code executed when the agent exits the object.
Local variable: agent - the agent

Ports

in
The input port.
out
The output port.