In GoldSrc entity system, the
activator is the initiator of the entity events.
The activator is one of two entity references passed to an entity being triggered, the other being the
caller. Whereas the caller is the immediate entity that triggers another entity, the activator reference is preserved and passed along when entities trigger other entities (aka a trigger chain). This allows a chaining of triggers e.g. a trigger targets a
trigger_relay
, which targets a
game_text
, which displays text to only the activator by default.
Scenarios where activator is used:
- Some entities such as
func_healthcharger
and game_text
acts on the activator by principle or by default. Others like env_fade
can be set to affect activators instead of globally.
- In multiplayer, it is used to award points to players who uses environmental traps or something like
func_tank
.
The activator chain however can be broken (i.e. the original activator reference lost) when:
- Delay is introduced (using "delay before trigger" property)
- Using
multi_manager
Therefore, care should be taken to make sure entities that affect activators aren't targeted in the above ways. For example, a
multi_manager
targeting a
game_text
will crash the game unless "All Players" flag is checked.
!activator
(SC, Featureful)*locus
(SoHL, Featureful)