Generic Keyvalues, Inputs and Outputs/Inputs: Difference between revisions
Jump to navigation
Jump to search
(→Inputs) |
(→Inputs: subsections) |
||
Line 1: | Line 1: | ||
== Inputs == | == Inputs == | ||
=== Context === | |||
{{I|AddContext|Adds to the entity's list of [[Response System|response contexts]]. See [[Context|Context]].|param=string}} | {{I|AddContext|Adds to the entity's list of [[Response System|response contexts]]. See [[Context|Context]].|param=string}} | ||
{{I|[[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. <br/>Format: <code><key> <value></code><br/>Format: <code><output name> <target>:<input name>:<parameter>:<delay>:<max times to fire, -1 means infinite></code>|param=string}} | {{I|[[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. <br/>Format: <code><key> <value></code><br/>Format: <code><output name> <target>:<input name>:<parameter>:<delay>:<max times to fire, -1 means infinite></code>|param=string}} | ||
{{I|ClearContext|Removes all contexts from this entity's list.}} | {{I|ClearContext|Removes all contexts from this entity's list.}} | ||
{{I|RemoveContext|Remove a context from this entity's list. The name should match the key of an existing context.|param=string}} | |||
=== Parenting === | |||
{{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|ClearParent|Removes this entity from the movement hierarchy, leaving it free to move independently.}} | {{I|ClearParent|Removes this entity from the movement hierarchy, leaving it free to move independently.}} | ||
=== Vscript === | |||
{{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}} | |||
=== Other <!-- better name needed? --> === | |||
{{I|FireUser1|to=FireUser4|Fires the respective<code>OnUser</code>outputs; see [[User Inputs and Outputs]].}} | {{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|[[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|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|SetDamageFilter|param=targetname|Sets a [[filter]] for this entity for when it receives damage.}} | {{I|SetDamageFilter|param=targetname|Sets a [[filter]] for this entity for when it receives damage.}} | ||
{{I|Use|Same as a player invoking [[+use]]; no effect in most cases.|nofgd=1}} | {{I|Use|Same as a player invoking [[+use]]; no effect in most cases.|nofgd=1}} | ||
=== Rendering === | |||
{{I RenderFields}} | |||
{{I Shadow}} | |||
=== Miscellaneous === | |||
{{Expand| | |||
{{I|SetTeam|Changes this entity's team.|nofgd=1|param=integer}} | {{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|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|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|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|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={{portal 2}}|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={{portal 2}}|nofgd=1}} | ||
{{I|SetLocalAngles|Set this entity's angles.|param=angles|since={{portal 2}}|nofgd=1}} | {{I|SetLocalAngles|Set this entity's angles.|param=angles|since={{portal 2}}|nofgd=1}} | ||
}} | |||
Revision as of 05:59, 16 March 2025
Inputs
Context
- AddContext <string >
- Adds to the entity's list of response contexts. See Context.
- AddOutput <string >
- 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.
Format:<key> <value>
Format:<output name> <target>:<input name>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- ClearContext
- Removes all contexts from this entity's list.
- RemoveContext <string >
- Remove a context from this entity's list. The name should match the key of an existing context.
Parenting
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <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 <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 movement hierarchy, leaving it free to move independently.
Vscript
- RunScriptFile <script > (in all games since
) (also in
)
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- RunScriptCode <string > (in all games since
) (also in
)
- 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.
- CallScriptFunction <string > (in all games since
) (also in
) !FGD
- Calls a VScript function defined in the scope of the receiving entity.
- TerminateScriptScope (only in
) !FGD
- Destroys the script scope of the receiving entity.
Other
- FireUser1 to FireUser4
- Fires the respective
OnUser
outputs; see User Inputs and Outputs.
- Kill
- Removes this entity and any entities parented to it from the world.
- KillHierarchy
- Functions the same as
Kill
, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKill
input.
- SetDamageFilter <targetname >
- Sets a filter for this entity for when it receives damage.
Rendering
RenderFields:
- Alpha <integer 0–255>
- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its
rendermode
set to a number other than0
.
- Color <color255 >
- Sets an RGB color for the entity.
Shadow:
- DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying EF_NOSHADOW.
- EnableShadow
- Turn dynamic shadows on for this entity.
- DisableReceivingFlashlight (in all games since
)
- This object will not receive light or shadows from projected textures.
- EnableReceivingFlashlight (in all games since
)
- This object may receive light or shadows from projected textures.
Miscellaneous
|