Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions
Jump to navigation
Jump to search
m (Pinsplash moved page KV BaseEntity to Template:KV BaseEntity: this is a template) |
(Raw keyvalues) |
||
Line 1: | Line 1: | ||
{{KV|Name|string|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}} | {{KV|Name (targetname)|string|The [[targetname]] that other entities refer to this entity by. {{{targetname add|}}}}} | ||
{{#if:{{{l4d2|}}}| | {{#if:{{{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|Entity Scripts (vscripts)|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. 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}} | {{KV|Script think function (thinkfunction)|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}} | ||
| }}{{#if:{{{l4d2|}}}||{{#if:{{{basehl2|}}}|| | | }}{{#if:{{{l4d2|}}}||{{#if:{{{basehl2|}}}|| | ||
{{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 (vscripts)|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. 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}} | {{KV|Script think function (thinkfunction)|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}} | ||
}}}} | }}}} | ||
{{KV|Global Entity Name|string|Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.}} | {{KV|Global Entity Name (globalname)|string|Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.}} | ||
{{KV|Parent|targetname|Specifies a [[Entity Hierarchy (parenting)|movement parent]]. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. | {{KV|Parent (parentname)|targetname|Specifies a [[Entity Hierarchy (parenting)|movement parent]]. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. | ||
:{{note|''Every'' entity can be parented, even point entities. Some entities which aren't intended to be parented may not function correctly. [[phys_constraint]] can be used as a workaround to parenting.}} | :{{note|''Every'' entity can be parented, even point entities. Some entities which aren't intended to be parented may not function correctly. [[phys_constraint]] can be used as a workaround to parenting.}} | ||
{{#if: {{{triggerwarning|}}} | {{warning|If a trigger does not start out with a parent but rather is assigned one dynamically, choose another entity and add it here as a dummy. Otherwise the trigger will stop colliding properly when it gets its real parent.}} }} | {{#if: {{{triggerwarning|}}} | {{warning|If a trigger does not start out with a parent but rather is assigned one dynamically, choose another entity and add it here as a dummy. Otherwise the trigger will stop colliding properly when it gets its real parent.}} }} | ||
{{#if: {{{cswarning|}}} | {{warning|In {{game link|Counter-Strike: Source}}, [[Counter-Strike Source Entity Overview#Counter-Strike Round Restarts|parenting this entity to another can break the map]].}} }} }} | {{#if: {{{cswarning|}}} | {{warning|In {{game link|Counter-Strike: Source}}, [[Counter-Strike Source Entity Overview#Counter-Strike Round Restarts|parenting this entity to another can break the map]].}} }} }} | ||
{{KV|Origin | {{KV|Origin {X Y Z} (origin)|origin|The position of this entity's center in the world. Rotating entities typically rotate around their origin.}} | ||
{{KV|Pitch Yaw Roll | {{KV|Pitch Yaw Roll {Y Z X} (angles)|angle|This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.}} | ||
:{{note|This works on brush entities, although the result is only clear in-game.}} | :{{note|This works on brush entities, although the result is only clear in-game.}} | ||
{{KV| | {{KV|Hammer ID (hammerid)|string|The entity's [[Hammer]] ID. Mainly used by plugins and debugging commands, such as [[ent_keyvalue]].}} {{Not in FGD}} | ||
{{KV|Effects|string|[[Effect flags]].}} {{Not in FGD}} | {{KV|Effects (effects)|string|[[Effect flags]].}} {{Not in FGD}} | ||
{{KV|Response Contexts|string|Pre-defined [[Response System|response system]] contexts for this entity. Format is <code>key:value,key:value,...</code>}} | {{KV|Response Contexts (ResponseContext)|string|Pre-defined [[Response System|response system]] contexts for this entity. Format is <code>key:value,key:value,...</code>}} | ||
:{{note|Despite the description, this works for ''all'' entities, although it is missing from most entities in the FGD.}} | :{{note|Despite the description, this works for ''all'' entities, although it is missing from most entities in the FGD.}} | ||
{{KV|Lag Compensation|boolean|Set to Yes to lag compensate this entity. Should be used very sparingly!|since=AS}} | {{KV|Lag Compensation (LagCompensate)|boolean|Set to Yes to lag compensate this entity. Should be used very sparingly!|since=AS}} | ||
[[Category:Keyvalue Templates|Global]] | [[Category:Keyvalue Templates|Global]] |
Revision as of 03:46, 23 July 2018
- Name (targetname) ([todo internal name (i)]) <string>
- The targetname that other entities refer to this entity by.
- Entity Scripts (vscripts) ([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 (thinkfunction) ([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.
- Global Entity Name (globalname) ([todo internal name (i)]) <string>
- Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
- Parent (parentname) ([todo internal name (i)]) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Note:Every entity can be parented, even point entities. Some entities which aren't intended to be parented may not function correctly. phys_constraint can be used as a workaround to parenting.
- Origin {X Y Z} (origin) ([todo internal name (i)]) <origin>
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
- Pitch Yaw Roll {Y Z X} (angles) ([todo internal name (i)]) <angle>
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Note:This works on brush entities, although the result is only clear in-game.
- Hammer ID (hammerid) ([todo internal name (i)]) <string>
- The entity's Hammer ID. Mainly used by plugins and debugging commands, such as ent_keyvalue. !FGD
- Effects (effects) ([todo internal name (i)]) <string>
- Effect flags. !FGD
- Response Contexts (ResponseContext) ([todo internal name (i)]) <string>
- Pre-defined response system contexts for this entity. Format is
key:value,key:value,...
Note:Despite the description, this works for all entities, although it is missing from most entities in the FGD.