Generic Keyvalues, Inputs and Outputs/Keyvalues

From Valve Developer Community
< Generic Keyvalues, Inputs and Outputs
Revision as of 04:25, 23 July 2018 by Ficool2 (talk | contribs) (Added more keyvalues, and re-organized the list.)
Jump to navigation Jump to search
Classname (classname) ([todo internal name (i)]) <string>
The classname defines the type of entity.
Note.pngNote:Classnames can be changed using AddOutput, which will influence how the engine deals with the entity in certain circumstances.
Name (targetname) ([todo internal name (i)]) <string>
The targetname that other entities refer to this entity by.
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.pngNote: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.pngNote:This works on brush entities, although Hammer doesn't show the new angles.
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.pngNote:Despite the description, this works for all entities, although it is missing from most entities in the FGD.
Minimum CPU Level (mincpulevel) ([todo internal name (i)]) <integer> (in all games since Left 4 Dead)
Minimum CPU Level allowed for this entity. 0 means all levels allowed. !FGD
Maximum CPU Level (maxcpulevel) ([todo internal name (i)]) <integer> (in all games since Left 4 Dead)
Maximum CPU Level allowed for this entity. 0 means all levels allowed. !FGD
Minimum GPU Level (mingpulevel) ([todo internal name (i)]) <integer> (in all games since Left 4 Dead)
Minimum GPU Level allowed for this entity. 0 means all levels allowed. !FGD
Maximum GPU Level (maxgpulevel) ([todo internal name (i)]) <integer> (in all games since Left 4 Dead)
Maximum GPU Level allowed for this entity. 0 means all levels allowed. !FGD
Todo: Better description for all of these.
Disable for Xbox 360 (disableX360) ([todo internal name (i)]) <boolean> (in all games since Left 4 Dead)
If Yes, disables this entity on the Xbox 360 version of Source. !FGD
Confirm:Playstation 3?
Glow Backface Multiple (glowbackfacemult) ([todo internal name (i)]) <string> (in all games since Left 4 Dead 2)
Unknown. Left 4 Dead 2 only. !FGD
Todo: Documentation.
Entity Scripts (vscripts) ([todo internal name (i)]) <scriptlist> (in all games since Left 4 Dead 2)
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 Left 4 Dead 2)
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.pngNote:Try to avoid expensive operations in this function, as it may cause performance problems.
Lag Compensation (LagCompensate) ([todo internal name (i)]) <boolean> (in all games since Alien Swarm)
Set to Yes to lag compensate this entity. Should be used very sparingly!
Is Automatic-Aim Target (is_autoaim_target) ([todo internal name (i)]) <boolean> (in all games since Counter-Strike: Global Offensive)
If yes, automatic-aim assistance will target this entity. !FGD