Keyvalue/Targetname: Difference between revisions
< Keyvalue
Jump to navigation
Jump to search
Deprecated (talk | contribs) m (Added non-SmartEdit names) |
(Started using new Since, etc. templates, revised documentation) |
||
Line 1: | Line 1: | ||
{{ScrollBox|title=Targetname| | {{ScrollBox|title=Targetname| | ||
{{KV|Name | {{KV|Name|string|intn=targetname|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}} | ||
{{#if:{{{l4d2|}}}| | {{#if:{{{l4d2|}}}| | ||
{{KV|Entity Scripts | {{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 | {{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}}}} | ||
| }}{{#if:{{{l4d2|}}}||{{#if:{{{basehl2|}}}|| | | }}{{#if:{{{l4d2|}}}||{{#if:{{{basehl2|}}}|| | ||
{{KV|Entity Scripts | {{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 | {{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> | }}<noinclude> | ||
[[Category:Keyvalue Templates|Targetname]] | [[Category:Keyvalue Templates|Targetname]] | ||
</noinclude> | </noinclude> |
Revision as of 06:45, 9 May 2020
Targetname:
- Name (targetname) <string>
- The targetname that other entities refer to this entity by.
- Entity Scripts (vscripts) <scriptlist> (in all games since
)
- 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> (in all games since
)
- 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.