Behaviors/Triggers Special Tags

Crowd behaviors and triggers allow to run MEL/Python commands when they start/stop/are successful. To interact between Entities and their related particles, Golaem Crowd defines special tags which can be used in those commands:
#ps# this tag is replaced with the name of the particle system shape to which the entity is attached
#pid# this tag is replaced with the id of the particle to which the entity is attached.
#gid# this tag is replaced with the Golaem Entity id (defined in the glmEntityId PP attribute) which is a unique id amongst all the particle systems.
#tid# this tag is replaced with the Golaem Entity Type id (defined in the glmEntityType PP attribute) to which the entity is attached.

Thus, these two tags can be used to identify the particle attached to the Entity on which the behavior is run. For example, if the user defines the function: 

global proc increaseHealth(string $particleSystem, int $particleId) {…}

To call this function with the current particle, the MEL command to use is;

increaseHealth("#ps#", #pid#)