Generic Keyvalues, Inputs and Outputs/Inputs

From Valve Developer Community
< Generic Keyvalues, Inputs and Outputs
Revision as of 03:31, 18 August 2018 by Ficool2 (talk | contribs) (Dispatcheffect)
Jump to navigation Jump to search
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although entities with a large number of children are killed marginally faster.
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
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.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
AddOutput <stringRedirectInput/string>
Evaluates a keyvalue/output on this entity.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
DispatchEffect <stringRedirectInput/string> !FGD
Dispatches a special effect from the entity's origin. This input has been removed in versions of Source since Left 4 Dead, as it was rendered obsolete by particles.
AddContext <stringRedirectInput/string>
Adds to the entity's list of response contexts. Format is <key>:<value>.
RemoveContext <stringRedirectInput/string>
Remove a context from this entity's list. The name should match the key of an existing context.
ClearContext <stringRedirectInput/string>
Removes all contexts from this entity's list.
RunScriptFile <scriptRedirectInput/string> (in all games since Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <stringRedirectInput/string> (in all games since Left 4 Dead 2)
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.
Icon-Bug.pngBug: In Left 4 Dead 2, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.  [todo tested in ?]
Warning.pngWarning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction <stringRedirectInput/string> (in all games since Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
Note.pngNote:This input is missing from some games FGD files.
SetLocalOrigin <origin> (in all games since Portal 2) !FGD
Set this entity's origin in the map.
Note.pngNote:This input is missing from some games FGD files.
SetLocalAngles <anglesRedirectInput/Vector> (in all games since Portal 2) !FGD
Set this entity's angles in the map.
Note.pngNote:This input is missing from some games FGD files.