Difference between revisions of "Template:KV Targetname"

From Valve Developer Community
Jump to: navigation, search
m
m (Added non-SmartEdit names)
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{ScrollBox|title=Targetname|
 
{{ScrollBox|title=Targetname|
Name <code><[[string]]></code>
+
{{KV|Name (targetname)|string|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}}
: The [[targetname]] other entities refer to this entity by. {{{targetname add|}}}
+
{{#if:{{{l4d2|}}}|
; {{l4d2 add|Entity Scripts <code><[[VScript]]s></code>}}
+
{{KV|Entity Scripts (vscripts)|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}}
: Name(s) of script files that are executed after all entities have spawned.
+
{{KV|Script think function (thinkfunction)|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}}
; {{l4d2 add|Script think function <code><[[string]]></code>}}
+
| }}{{#if:{{{l4d2|}}}||{{#if:{{{basehl2|}}}||
: Name of a function in this entity's script scope which will be called automatically.
+
{{KV|Entity Scripts (vscripts)|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}}
}}
+
{{KV|Script think function (thinkfunction)|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}}
 +
}}}}
 +
}}<noinclude>
 +
[[Category:Keyvalue Templates|Targetname]]
 +
</noinclude>

Latest revision as of 02:39, 14 January 2020

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (New with Left 4 Dead 2)
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.
Script think function (thinkfunction) <string> (New with Left 4 Dead 2)
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.