Targetname

This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.
Targetname is a
base
Keyvalue available in all Source games.
Targetname (prevedeno: ime cilja) (također poznato jednostavno kao Name) je ime entiteta. Ciljno ime nije potrebno za postojanje entiteta, ali općenito mora biti prisutno da bi entitet igrao ulogu u I/O sustav .
Bilješke
- Entiteti također mogu biti meta njihovih classname (npr.
prop_dynamic
). - Imena ciljeva ne moraju biti jedinstvena, mogu se dijeliti (a unosi će se slati svakom). Duplicirani nazivi ciljeva prikazani su podebljanim fontom.
- Nazivi ciljeva ne mogu sadržavati
!
ili*
znakova (vidi dolje). - Nazivi ciljeva također ne mogu sadržavati
,
znakova ako namjeravate koristiti entitet kao nadređenog, jer se to koristi za postavljanje točke privitka .
Instance
- Instance može koristiti popravke imena prefiksa ili postfiksa i automatski će generirati prefiks ako nisu navedeni parametri.
- Prefiksi i postfiksi odvojeni su jednom crticom, npr. hall_a3-door_02.
- Postavljanje
@
simbol na početku naziva cilja (e.g. @exit_door) će zaobići popravak imenovanja za taj određeni entitet. Ako @exit_door i exit_door_relay bili dio instance s prefiksom Door_01, nazivi entiteta bili bi @exit_door i Door_01-exit_door_relay.
Događaji Igrača
U većini igara za više igrača, bilo kojem entitetu sa sljedećim imenima ciljeva bit će poslan unos Use kada se taj događaj dogodi.
game_playerdie
- Pali svaki put kad player umre. Igrač koji je umro je!activator
.game_playerkill
- Pali svaki put kad player ubije drugog igrača, ubojica je!activator
.game_playerjoin
- Pali svaki put kad player pridruži igri, igrač koji se pridruži je!activator
.game_playerspawn
- Pali svaki put kad Pojavljuje se player, s igračem koji se pojavljuje kao!activator
.Greška:
game_playerspawn
ne funkcionira u. [to-do: testirano u ?]
game_playerleave
- Pali se svaki put kad player napusti igru.!activator
neće raditi u ovom slučaju, jer entitetplayer
više ne postoji.




player_spawn
, player_death
i player_disconnect
.Podudaranje imena
Dok traži entitet, Source može koristiti nekoliko proširenih značajki podudaranja koje su korisne u raznim situacijama. Koriste se za ciljanje entiteta s nepoznatim ili djelomično poznatim imenom, a najčešće se koriste u I/O lancima, ali se također mogu koristiti u ključnim vrijednostima koje ciljaju entitete, poput filtra KV u filter_activator_name/klasa]
ili nadređeno polje entiteta. Proširene značajke su:
- Wildcards
- Source supports
*
wildcards to a limited extent. This means searching for area1* will match any targetnames that start with area1, like area1_portal or area1_door, but not area2_door. These wildcards are also limited to trailing*
, which means more complex wildcards like *_door or area*_door will not function.Bilješka:
Mapbase has support for complex wildcard matching like *_door, area*_door, ar*a*_d*r,
?
wildcards, etc.Bilješka:Hammer does not recognize most of these forms of matching and will see them as errors in the editor, but they will work in-game.
The I/O System also supports classname matching, which matches by an entity's classname rather than its targetname. This uses all of the same extended matching features listed above. Some other parts of Source support classname matching, but this usually isn't the case unless stated otherwise.

Keywords
The following special targetnames can be used to dynamically select an entity.

!activator
parameter but player's SetFogController input is not able to evaluate !activator/!caller
and needs to use the desired env_fog_controller's targetname.!activator
- The entity that began the current I/O chain.
- If a player walks into a trigger that fires a logic_relay, the player is the
!activator
of the relay's output(s). !self
- The entity from which the current input originates.
- If a player walks into a trigger that fires a logic_relay, the relay is the
!self
of its output(s).
- If a logic_relay fires
ForceSpawnAtEntityOrigin !self
to an env_entity_maker withOnTrigger
, the!self
entity is the env_entity_maker itself.
!caller
- The entity from which the current output originates.
- If a player walks into a trigger that fires a logic_relay, the trigger is the
!caller
of the relay's output(s).
- If a logic_relay fires
ForceSpawnAtEntityOrigin !caller
to an env_entity_maker withOnTrigger
, the!caller
entity is the relay itself. - For entities such as
filter_activator_[xxxx]
or logic_case, the!caller
of aTestActivator
orPickRandom/PickRandomShuffle
is thefilter_activator_[xxxx]
/logic_case
itself, not the entity that fired the input.
Bilješka:Individual inputs can override the entity targeted by
!caller
! This is done by point_entity_finder, math_counter, logic_case, and filter entities.!player
- Targets the player.
- In multiplayer games, it targets the first player that joined the server.


player
classname.
parentname
parameter fail to parent on map startup. [to-do: testirano u ?]Raditi okolo:Use a logic auto and a
SetParent
input instead.!player_blue
(samo u)
- In Portal 2 Coop, this targets ATLAS (player 1).
!player_orange
(samo u)
- In Portal 2 Coop, this targets P-Body (player 2).
!pvsplayer
- The first player found in the entity's Potential Visibility Set. The PVS used is taken from the entity doing the searching, or the activator if no searching entity exists. If no activator exists either, the first player in the game is returned (i.e.
!player
). !picker
- The first entity under the player's crosshair; mostly only for debugging. Entities without collision can only be selected by aiming at their origin.
- In multiplayer games, it uses the first player that joined the server.
FindNamedEntity Keywords
These keywords are only available in FindNamedEntity
, a method specific to NPCs which is only searched by specific systems (e.g. choreographed scenes) and not by things like the I/O System.
- Napraviti:
Mapbase makes this available to I/O searches. Is this the case in any other branch?
!speechtarget
- The entity at which the
!caller
is looking due to a Look At Actor or Face Actor choreography event. !friend
- The
!caller
's nearest friendly NPC. This returns the player on NPCs which don't descend fromCAI_PlayerAlly
. !enemy
- The current enemy of the
!caller
.
Keyword Notes
- Both
!activator
and!caller
can be different for specific inputs, which depends on each input's implementation. In most cases this is in an undesired manner, likeGetValue
for math_counter. - When an output's "Target Entity" is empty,
!self
is not set to the!caller
value. - Targetnames used in an output's parameter override field are evaluated by the entity that receives the output, not the one that sends it.
See also
- User Inputs and Outputs
GetDebugName()
, for accessing an entity's targetname in C++.