- A targetname is not required for an entity to exist, but in some cases must be present for an entity to play a part in the I/O System.
- A targetname must be stored in the map's entity data block, so avoid naming entities that don't need a name (i.e. aren't ever referenced by another entity). The comment field in Hammer is useful for describing entities that don't need targetnames, and doesn't get saved into the
.bspentity data block.
- Targetnames do not need to be unique. As many entities as the mapper wants can share the same name, and they will all respond to the same inputs. Duplicated targetnames are displayed in bold font.
- Targetnames are also useful for categorizing entities (area1_name, area2_name, etc.).
- Targetnames cannot contain
*characters (see below).
There are several extended features to name searches that are useful in a variety of situations. The most common use is to target an entity with an unknown name that is somehow involved in the current I/O chain. The extended features are:
- Name searching supports trailing * wildcards only. So searching for area1* will match any targetnames that start with area1 (i.e. area1_portal and area1_door, but not area2_door).
- The I/O System is classname friendly, but Hammer isn't. This is the case that doesn't require a targetname for the I/O System.
- An example of this is use of ent_fire with a classname as opposed to a targetname.
The following generic targetnames can be used in place of entity or class names, for situations where specifying either would be too restrictive:
|!player||The player. Only useful in singleplayer. |
Note:To target all players in a multiplayer game use
|!activator||The entity that started the current I/O chain. For example:|
|!caller||The entity that triggered the current I/O command. For example:|
|!self||The entity from which the Output originates.
|!pvsplayer||The first player found in the entity's PVS.
|!speechtarget||The entity at which the caller is looking, as defined by the Look At Actor and Face Actor choreography events.|
|!picker||The entity that the player is looking at. Only useful in single-player, and mostly only for debugging. Note that this only finds entities that are solid (i.e. can be hit by the invisible "bullet" fired to find the entity under the crosshair).|
- Client Command by Trigger proximity, a mini-tutorial explaining the process of letting the player(s) in your game execute a Client Command by a trigger.