Keyvalue/Targetname: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(The return value of think functions can be used to adjust the delay.)
No edit summary
 
(54 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{ScrollBox|title=Targetname|
{{LanguageBar}}
{{KV|Name|string|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}}
<onlyinclude>{{KV
{{KV|Entity Scripts|scriptlist|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}}
| intn = targetname
{{KV|Script think function|string|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}}
| addtext = {{Invisible edit link|namespace=|Keyvalue/Targetname}}
}}<noinclude>
| 1 = [[Targetname|Name]]
[[Category:Keyvalue Templates|Targetname]]
| 2 = target_source
</noinclude>
| 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]].}} {{seealso|[[Generic Keyvalues, Inputs and Outputs]] available to all entities}}</onlyinclude>
 
{{wikinote|Can be added to entity pages using template {{T|KV Targetname}}. Language is selected automatically based on the page's prefix.}}

Latest revision as of 07:37, 2 June 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>[ Edit ]
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.