User:Nescius/sandbox/test21: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Keyvalues ==
<includeonly>{{bug|{{subst:#if:{{{tested|}}}|tested={{{tested}}}|hidetested=1}}|{{{1}}}{{subst:#if:{{{only|}}}|{{subst:!}}only={{{only}}}}}{{subst:#if:{{{since|}}}|{{subst:!}}since={{{since}}}}}{{subst:#if:{{{fixed|}}}|{{subst:!}}fixed={{{fixed}}}}}}}</includeonly>
{{KV|Collisions|intn=solid|choices|}}
{{KV|[[targetname|Name]]|intn=targetname|string|}}
{{KV|[[Parent]]|intn=parentname|targetname|}}
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|}}
{{KV|[[Pitch Yaw Roll]] (Y Z X)|intn=angles|angle|}}
{{KV|[[Classname]]|intn=classname|string|nofgd=1|}}
{{KV|[[Spawnflags]]|intn=spawnflags|flags||nofgd=1}}
{{KV|[[Effect flags|Effects]]|intn=effects|flags||nofgd=1}}
{{KV|Entity Scripts|intn=vscripts|scriptlist||since=L4D2|also={{tf2}}}}
{{KV|[[Entity_Scripts#Thinker_Functions|Think function]]|intn=thinkfunction|string||since=L4D2|also={{tf2}}}}
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean||nofgd=1|since=L4D2}}
{{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool||nofgd=1|since=CSGO}}
 
 
== Inputs ==
{{I|AddContext|Adds to the entity's list of [[Response System|response contexts]]. See [[Context|Context]].|param=string}}
{{I|{{Lx|AddOutput}}|Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:{{Expand|<syntaxhighlight lang="PowerShell">
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"
 
// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
</syntaxhighlight>| Syntax<nowiki>:</nowiki>}}|param=string}}
{{I|ClearContext|Removes all contexts from this entity's list.}}
{{I|ClearParent|Removes this entity from the movement hierarchy, leaving it free to move independently.}}
{{I|FireUser1|to=FireUser4|Fires the respective<code>OnUser</code>outputs; see [[User Inputs and Outputs]].}}
{{I|[[Kill]]|Removes this entity and any entities parented to it from the world.}}
{{I|KillHierarchy|Functions the same as <code>Kill</code>, although this entity and any entities parented to it are killed on the same frame, being marginally faster than<code>Kill</code>input.}}
{{I|RemoveContext|Remove a context from this entity's list. The name should match the key of an existing context.|param=string}}
{{I|SetParent|Move with this entity. See [[Entity Hierarchy (parenting)]].|param=string}}
{{I|SetParentAttachment|Change this entity to attach to a specific [[attachment]] point on its parent. The entity will teleport so that the position of its root [[bone]] matches that of the attachment.  Entities must be parented before being sent this input.|param=string}}
{{I|SetParentAttachmentMaintainOffset|As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.|param=string}}
{{I|Use|Same as a player invoking [[+use]]; no effect in most cases.|nofgd=1}}
{{I|SetTeam|Changes this entity's team.|nofgd=1|param=integer}}
{{I|TeamNum|This input changes value for <code>TeamNum</code> property.|nofgd=1|param=integer}}
{{I|DispatchResponse|Dispatches a response to the entity. See [[Response]] and [[Concept]].|param=string|nofgd=1}}
{{I|DispatchEffect|Dispatches a special effect from the entity's origin; See also [[List of Client Effects]]. Replaced by the [[particle]] system since {{l4d}}.|param=string|removed={{l4d}}|nofgd=1}}
{{I|RunScriptFile|Execute a [[VScript]] file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.|param=script|since={{l4d2}}|also={{tf2}}}}
{{I|RunScriptCode|Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.|param=string|since={{l4d2}}|also={{tf2}}}}
{{I|CallScriptFunction|Calls a VScript function defined in the scope of the receiving entity.|param=string|since={{l4d2}}|also={{tf2}}|nofgd=1}}
{{I|TerminateScriptScope|Destroys the script scope of the receiving entity.|only={{tf2}}|nofgd=1}}
{{I|SetLocalOrigin|Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.|param=coordinates|since={{as}}|nofgd=1}}
{{I|SetLocalAngles|Set this entity's angles.|param=angles|since={{as}}|nofgd=1}}
 
== Outputs ==
{{O|OnUser1|to=OnUser4|These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see [[User Inputs and Outputs]].}}
OnKilled|only={{l4d}}|This output fires when the entity is killed and removed from the game.}}

Latest revision as of 06:59, 20 May 2025