Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Some pages may become broken after this change)
Line 1: Line 1:
{{Lang|Template:KV BaseEntity}}
{{lang|Template:KV BaseEntity}}
<onlyinclude><includeonly><!--


{{Documentation}}
-->{{ScrollBox
 
|title=Base
== Tests ==
|noscroll={{{noscroll|1}}}
{{KV|start}}
|<!--
{{KV BaseEntity|new=1|spawnflags=2}}
{{KV|end}}
 
<includeonly><onlyinclude>{{#if:{{{new|}}}|<!--
-->{{KV|new=1|targetname|string|src=Base|[[targetname|Name]]|The name that other entities use to refer to this entity.}}
 
{{KV|new=1|parentname|targetname|src=Base|[[Parent]]|Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (<code>parentname [targetname],[attachment]</code>) {{ModernTip|Entities transition to the next map with their parents}}{{ModernTip|{{Ent|phys_constraint}} can be used as a workaround if parenting fails.}}}}
 
{{KV|new=1|origin|coordinates|src=Base|[[Origin]] (X Y Z)|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{ModernNote|Hammer does not move the entities accordingly only in the editor.}}}}
 
{{KV|new=1|angles|angle|src=Base|[[Pitch Yaw Roll]] (X Y Z)|value=0 0 0|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.{{ModernNote|This works on brush entities, although Hammer doesn't show the new angles.}}}}
 
{{KV|new=1|classname|string|src=Base|[[Classname]]|nofgd=1|Determines the characteristics of the entity ''before'' it spawns. {{ModernTip|Changing this on runtime still has use, like making matching an entry in [[S_PreserveEnts]] will persist the entity on new rounds!}}}}
 
{{#if:{{{brush| {{#ifeq:{{str left|{{ROOTPAGENAME}}|4}}|Func|1|}} }}}
|{{KV|new=1|solid|choices|src=Base|Collisions|value=Use VPhysics|rawValue={{Code|6}}|Method of collision for this entity.
 
'''Values:'''
* 0: None
* 1: BSP ([[QPhysics]]) {{Not in FGD}} {{ModernBug|In {{portal2}}, if an entity using QPhysics collisions is hit by [[Gel]], the game will crash!|only=portal2}}
* 2: [[Bounding box|Bounding Box]]
* 3: Oriented Bounding Box (Use for runtime spawned brush entities meant to be rotated) {{Not in FGD}}
* 4: Oriented Bounding Box but constrained to [[QAngle|Yaw]] only {{Not in FGD}}
* 5: Custom/Test (Usually no collision with anything) {{Not in FGD}}
* 6: [[VPhysics]]}}
|}}
 
{{KV|new=1|spawnflags|integer|src=Base|[[Flag|Flags]]|value={{{spawnflags|}}}|nofgd=1|Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.}}
 
{{KV|new=1|effects|int|src=Base|[[Effect flags|Effects]]|nofgd=1|Combination of effect flags to use.}}
{{#if:{{{l4d2|}}}
| {{KV|new=1|vscripts|scriptlist|src=Base|Entity Scripts|since=L4D2|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.}}
 
{{KV|new=1|thinkfunction|string|src=Base|[[Entity_Scripts#Thinker_Functions|Think function]]|since=L4D2|Name of the function within this entity's script that'll be called automatically every 100 milliseconds, or a user-defined interval if the function returns a number. Avoid [[expensive]] operations in this function, as it may cause performance problems.}}
 
{{KV|new=1|LagCompensate|boolean|src=Base|[[Lag Compensation]]|nofgd=1|since=L4D2|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!}}
| {{#switch:{{{base|}}}|0=|{{KV|new=1|vscripts|scriptlist|src=Base|Entity Scripts|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. Scripts executed on the [[worldspawn]] entity will be placed in root scope.|since=L4D2|also={{tf2}}}}
 
{{KV|new=1|thinkfunction|string|src=Base|[[Entity_Scripts#Thinker_Functions|Think function]]|Name of the function within this entity's script that'll be called automatically every 100 milliseconds, or a user-defined interval if the function returns a number. Avoid [[expensive]] operations in this function, as it may cause performance problems.|since=L4D2|also={{tf2}}}}
 
{{KV|new=1|LagCompensate|boolean|src=Base|[[Lag Compensation]]|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}}
 
{{KV|new=1|is_autoaim_target|bool|src=Base|Is Automatic-Aim Target|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}}
}}}}|}}<!--
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
==================================================================
DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED:
==================================================================
 
-->{{#if:{{{new|}}}||{{ScrollBox|title=Base|noscroll={{{noscroll|1}}}|<!--


   ++ BRUSH ++
   ++ BRUSH ++
Line 99: Line 32:
{{KV|Global Entity Name|intn=globalname|string| When the player transitions to a new map, entities in the new map with matching globalnames will have their previous map's states copied over to it.}}
{{KV|Global Entity Name|intn=globalname|string| When the player transitions to a new map, entities in the new map with matching globalnames will have their previous map's states copied over to it.}}
-->
-->
{{KV|[[Parent]]|intn=parentname|targetname|Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (<code>parentname [targetname],[attachment]</code>) {{ModernTip|Entities transition to the next map with their parents}}{{ModernTip|{{Ent|phys_constraint}} can be used as a workaround if parenting fails.}}}}
{{KV|[[Parent]]|intn=parentname|targetname|Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (<code>parentname [targetname],[attachment]</code>) {{ModernTip|Entities transition to the next map with their parents}}{{ModernTip|{{ent|mode=link|phys_constraint}} can be used as a workaround if parenting fails.}}}}
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{ModernNote|Hammer does not move the entities accordingly only in the editor.}}}}
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{ModernNote|Hammer does not move the entities accordingly only in the editor.}}}}
{{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=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.{{ModernNote|This works on brush entities, although Hammer doesn't show the new angles.}}}}
{{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=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.{{ModernNote|This works on brush entities, although Hammer doesn't show the new angles.}}}}
Line 138: Line 71:
{{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}}
{{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}}
| }} }}
| }} }}
}}<!--
}}
</includeonly></onlyinclude>


-->}}</onlyinclude></includeonly>
{{documentation}}
<!-- Add categories to the /doc subpage, not here -->

Revision as of 05:20, 2 May 2023

English (en)中文 (zh)Translate (Translate)


English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Icon-translate.png Available doc translations
Info.png
The Generic Keyvalues, Inputs and Outputs/Keyvalues/doc documentation page does not exist.
English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Generic Keyvalues, Inputs and Outputs/Keyvalues/doc