Keyvalue/Targetname: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Improved description of the vscript-related keyvalues)
Line 2: Line 2:
{{KV|Name|target_source|The name that other entities refer to this entity by. {{{targetname add|}}}}}
{{KV|Name|target_source|The name that other entities refer to this entity by. {{{targetname add|}}}}}
{{KV|Entity Scripts|scriptlist|Name(s) of script files that are executed after all entities have spawned.|since=L4D2}}
{{KV|Entity Scripts|scriptlist|Name(s) of script files that are executed after all entities have spawned.|since=L4D2}}
{{KV|Script think function|string|Name of a function in this entity's script scope which will be called automatically.|since=L4D2}}
{{KV|Script think function|string|Name of a function in this entity's [[Think()|think function]] 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 simulate autonomous behavior.{{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 01:32, 10 June 2011

Targetname:
Name ([todo internal name (i)]) <string>
The name that other entities refer to this entity by.
Entity Scripts ([todo internal name (i)]) <scriptlist> (in all games since Left 4 Dead 2)
Name(s) of script files that are executed after all entities have spawned.
Script think function ([todo internal name (i)]) <string> (in all games since Left 4 Dead 2)
Name of a function in this entity's think function 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 simulate autonomous behavior.
Note.pngNote:Try to avoid expensive operations in this function, as it may cause performance problems.