Keyvalue/Targetname: Difference between revisions
< Keyvalue
Jump to navigation
Jump to search
mNo edit summary |
TeamSpen210 (talk | contribs) (The return value of think functions can be used to adjust the delay.) |
||
Line 2: | Line 2: | ||
{{KV|Name|string|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}} | {{KV|Name|string|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}} | ||
{{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}} | {{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}} | ||
{{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.{{note|Try to avoid expensive operations in this function, as it may cause performance problems.}}|since=L4D2}} | {{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}} | ||
}}<noinclude> | }}<noinclude> | ||
[[Category:Keyvalue Templates|Targetname]] | [[Category:Keyvalue Templates|Targetname]] | ||
</noinclude> | </noinclude> |
Revision as of 21:36, 3 November 2016
Targetname:
- Name ([todo internal name (i)]) <string>
- The targetname that other entities refer to this entity by.
- Entity Scripts ([todo internal name (i)]) <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 ([todo internal name (i)]) <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.