Prefixes and Postfixes for Switching Target Object States
An early implementation of this system was available in the Spirit of Half-Life mod. The purpose is to introduce a way to explicitly define the behaviour of a controllable target. This means that objects with two or more possible states can be explicitly forced to switch to any of these states. The classic example involves
The prefix system addresses this precise issue and gives the mapper ample possibilities. In addition, it makes scripts more stable and less dependent on the actions of the player, who might block objects in such
+ | Activate target, turn on |
- | Deactivate target, turn off |
< | Set a numeric parameter for the object further on in the postfix (what parameter is affected depends on the object) |
> | Reset the object parameter that was set using the previous method or perform a custom action (depends on the object) |
! | Remove the object from the map |
The + and - prefixes work identically for all entities except those that are not supposed to ever be activated, such as worldspawn or player. The
The < and > prefixes, however, are tailored for each entity, because the current implementation does not support configuring arbitrary parameters of arbitrary objects. Therefore, only the highest-priority parameter (if any) is configured for each entity. For example, in a func_rotating entity these prefixes let you change the rotation speed and motion direction; in
For details about the use of prefixes, refer to the descriptions of particular entities.
System Limitations
The primary limitation is that the effect of some prefixes is unpredictable. This detracts from the usefulness of the technique as a global system.