Keyvalue/Targetname: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Template is deprecated)
(Cleaned up unnecessary/'bloaty' invisible content with poor accessibility)
 
(51 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<noinclude>
{{LanguageBar}}
{{note|'''This template is deprecated. For new entity pages, please use [[Template:KV BaseEntity]] instead.'''}}
<onlyinclude>{{KV
</noinclude>
| intn = targetname
{{ScrollBox|title=Targetname|
| 1 = [[Targetname|Name]]
{{KV|[[Targetname|Name]]|string|intn=targetname|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}}
| 2 = target_source
{{#if:{{{l4d2|}}}|
| 3 = The name that other entities refer to this entity by, via [[Inputs and Outputs|Inputs/Outputs]] or other [[keyvalue]]s (e.g. <code>[[Entity Hierarchy (parenting)#Parentname|parentname]]</code> or <code>target</code>).<br>Also displayed in Hammer's 2D views and [[Hammer Entity Report Dialog|Entity Report]].
{{KV|Entity Scripts|scriptlist|intn=vscripts|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since={{l4d2}}}}
}}
{{KV|Script think function|string|intn=thinkfunction|Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. {{note|Try to avoid expensive operations in this function, as it may cause performance problems.}}|since={{l4d2}}}}
:{{Seealso|[[Generic Keyvalues, Inputs and Outputs]] available to all entities}}</onlyinclude>
| }}{{#if:{{{l4d2|}}}||{{#if:{{{basehl2|}}}||
{{Wikinote|Can be added to entity pages using template {{T|KV Targetname}}. Language is selected automatically based on the page's prefix.}}
{{KV|Entity Scripts|scriptlist|intn=vscripts|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since={{l4d2}}}}
{{KV|Script think function|string|intn=thinkfunction|Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. {{note|Try to avoid expensive operations in this function, as it may cause performance problems.}}|since={{l4d2}}}}
}}}}
}}<noinclude>
[[Category:Keyvalue Templates|Targetname]]
</noinclude>

Latest revision as of 17:14, 7 November 2025

English (en)Deutsch (de)Español (es)Français (fr)Hrvatski (hr)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)中文 (zh)Translate (Translate)
Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also: Generic Keyvalues, Inputs and Outputs available to all entities
Wiki Note:Can be added to entity pages using template {{KV Targetname}}. Language is selected automatically based on the page's prefix.