The Half-Life Unified SDK extends the original entity triggering system with two significant additions: wildcard target matching and target selectors. Both features allow level designers to write more flexible and powerful trigger chains without needing to name every entity individually or wire up complex intermediate entities.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/twhl-community/halflife-unified-sdk/llms.txt
Use this file to discover all available pages before exploring further.
The entity triggering system uses the logger named
ent.io. Enable it to trace trigger firing, wildcard resolution, and selector lookups during map development.Wildcard Targeting
Any target keyvalue in the SDK supports a wildcard character (*) at the end of a target name. When a wildcard is used, the trigger fires all entities whose name starts with the given prefix — not just the first match.
Syntax
Place* at the very end of a target name:
room1_.
Example
Suppose you have the following entities placed in a map:| Entity | Name |
|---|---|
func_door | room1_door1 |
env_sprite | room1_sprite1 |
func_button | entrance_button |
entrance_button has its target set to room1_*, triggering the button will fire both room1_door1 and room1_sprite1 simultaneously.
Target Selectors
Target selectors are special tokens that resolve to a specific entity in the current trigger execution context rather than looking up an entity by name. They can be used in any keyvalue that accepts a target name, includingtarget, killtarget, and similar fields.
Supported Selectors
| Selector | Resolves To |
|---|---|
!activator | The entity that started the current trigger execution. |
!caller | The last entity in the trigger execution chain. |