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

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(replaced all text to strings)
Line 78: Line 78:


-->{{#ifeq: {{{brush| {{#ifeq: {{lc:{{str left|{{ROOTPAGENAME}}|4}} }} | func | 1 | 0 }} }}} |0||<!-- if pagename starts with "func" use {{{brush|1}}}, otherwise {{{brush|0}}} -->
-->{{#ifeq: {{{brush| {{#ifeq: {{lc:{{str left|{{ROOTPAGENAME}}|4}} }} | func | 1 | 0 }} }}} |0||<!-- if pagename starts with "func" use {{{brush|1}}}, otherwise {{{brush|0}}} -->
{{KV|Collisions|intn=solid|choices|Method of collision for this entity.<!--
{{KV|Collisions|intn=solid|choices|{{KV BaseEntity/strings|KeySolidDesc}}<!-- end Strings
-->{{ExpandBox|
:*0: None
:*1: BSP ([[QPhysics]]) {{Not in FGD}} {{Bug|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]]<!--
-->}}<!-- end ExpandBox
-->}}<!-- end KV -->
-->}}<!-- end KV -->
<!-- "mins" and "maxs" used to be here, but the "Bounding Box" page already describes it -->
<!-- "mins" and "maxs" used to be here, but the "Bounding Box" page already describes it -->
<!-- We should make a new page for "model index"?
<!-- We should make a new page for "model index"?
{{KV|Model Index|intn=modelindex|short|Given the number index from dumping the<code>cl_precacheinfo modelprecache</code>table, sets entity model to of the index. {{Warning|If an entity has animations that ''will be'' played, then the set model also must have its own sequences, else the game crashes.}}|nofgd=1}}
{{KV|Model Index|intn=modelindex|short|{{KV BaseEntity/strings|KeyModelindexDesc}}|nofgd=1}}
-->
-->
<br />
<br />
Line 98: Line 89:
   ++ BASE ++
   ++ BASE ++


-->{{KV|[[targetname|Name]]|intn=targetname|string|The name that other entities use to refer to this entity.}}
-->{{KV|[[targetname|Name]]|intn=targetname|string|{{KV BaseEntity/strings|KeyTargetnameDesc}}}}
<!-- This probably have too little use cases, we'll have to see if someone objects.
<!-- This probably have too little use cases, we'll have to see if someone objects.
{{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|{{KV BaseEntity/strings|KeyGlobalnameDesc}}}}
-->
-->
{{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>) {{Tip|Entities transition to the next map with their parents}}{{Tip|{{Ent|phys_constraint}} can be used as a workaround if parenting fails.}}}}
{{KV|[[Parent]]|intn=parentname|targetname|{{KV BaseEntity/strings|KeyParentnameDesc}}}}
{{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.{{Note|Hammer does not move the entities accordingly only in the editor.}}}}
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|{{KV BaseEntity/strings|KeyOriginDesc}}}}
{{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.{{Note|This works on brush entities, although Hammer doesn't show the new angles.}}}}<!--
{{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=angles|angle|{{KV BaseEntity/strings|KeyAnglesDesc}}}}<!--
This probably have too little use cases, we'll have to see if someone objects. Thankfully the page already describes its existence.
This probably have too little use cases, we'll have to see if someone objects. Thankfully the page already describes its existence.
{{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|Pre-defined response system contexts; Format is <code>[key]:[value],[key]:[value],...</code>and so on. {{Tip|Can also be [[filter_activator_context|filtered for or against!]]}}}}
{{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|{{KV BaseEntity/strings|KeyResponseContextDesc}}}}
-->
-->
{{KV|[[Classname]]|intn=classname|string|nofgd=1|Determines the characteristics of the entity ''before'' it spawns. {{Note<!--This used to be a Tip but it broke ExpandBoxes/ScrollBoxes... why?-->|Changing this on runtime still has use, like making matching an entry in [[S_PreserveEnts]] will persist the entity on new rounds!}}}}
{{KV|[[Classname]]|intn=classname|string|nofgd=1|{{KV BaseEntity/strings|KeyClassnameDesc}}}}
{{KV|[[Flag|Flags]]|intn=spawnflags|integer|Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.|nofgd=1}}
{{KV|[[Flag|Flags]]|intn=spawnflags|integer|{{KV BaseEntity/strings|KeyFlagsDesc}}|nofgd=1}}
{{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}}<!--
{{KV|[[Effect flags|Effects]]|intn=effects|int|{{KV BaseEntity/strings|KeyEffectsDesc}}|nofgd=1}}<!--
--><!--I'm not sure what the use cases of these 2 are, so ill hide them for now. Sourcemod scripters don't use "hammerid" often either
--><!--I'm not sure what the use cases of these 2 are, so ill hide them for now. Sourcemod scripters don't use "hammerid" often either
{{KV|Local Time|intn=ltime|float|The local time of the entity, independent of the global clock. Used mainly for physics calculations.|nofgd=1}}
{{KV|Local Time|intn=ltime|float|{{KV BaseEntity/strings|KeyLtimeDesc}}|nofgd=1}}
{{KV|Next Think|intn=nextthink|float|Amount of time before the entity [[Thinking|thinks]] again.|nofgd=1}}
{{KV|Next Think|intn=nextthink|float|{{KV BaseEntity/strings|KeyNextthinkDesc}}|nofgd=1}}
{{KV|Hammer ID|intn=hammerid|int|The entity's unique [[Hammer]] ID that's auto-generated on map compiles. Mainly used by plugins or debugging commands (like the'''<code>ent_keyvalue</code>'''command). Run-time spawned entities don't have a Hammer ID.|nofgd=1}}
{{KV|Hammer ID|intn=hammerid|int|{{KV BaseEntity/strings|KeyHammeridDesc}}|nofgd=1}}
--><!--
--><!--


Line 120: Line 111:


-->{{#ifexpr: {{{l4d2|0}}}. or not {{{base|0}}}. |<!-- hides only if L4D2 == 0 and BASE != 0 -->
-->{{#ifexpr: {{{l4d2|0}}}. or not {{{base|0}}}. |<!-- hides only if L4D2 == 0 and BASE != 0 -->
{{KV|Entity Scripts|intn=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. Scripts executed on the [[worldspawn]] entity will be placed in root scope.|since=L4D2|also={{tf2}}}}
{{KV|Entity Scripts|intn=vscripts|scriptlist|{{KV BaseEntity/strings|KeyVScriptsDesc}}|since=L4D2|also={{tf2}}}}
{{KV|[[Entity_Scripts#Thinker_Functions|Think function]]|intn=thinkfunction|string|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|[[Entity_Scripts#Thinker_Functions|Think function]]|intn=thinkfunction|string|{{KV BaseEntity/strings|KeyThinkFunctionDesc}}|since=L4D2|also={{tf2}}}}
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}}<!--
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|{{KV BaseEntity/strings|KeyLagCompensateDesc}}|nofgd=1|since=L4D2}}<!--
--><!-- Its 360, so it goes away
--><!-- Its 360, so it goes away
{{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}}
{{KV|Disable for Xbox 360|intn=disableX360|bool|{{KV BaseEntity/strings|KeyDisableX360Desc}}|nofgd=1|since=L4D2}}
-->}}<!--
-->}}<!--


-->{{#ifexpr: not {{{l4d2|0}}}. and not {{{base|0}}}. |<!-- hides if L4D2 != 0 or BASE != 0 -->
-->{{#ifexpr: not {{{l4d2|0}}}. and not {{{base|0}}}. |<!-- hides if L4D2 != 0 or BASE != 0 -->
{{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|{{KV BaseEntity/strings|KeyIs_autoaim_targetDesc}}|nofgd=1|since=CSGO}}<!--
-->}}<!--
-->}}<!--



Revision as of 21:30, 10 January 2024

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

Tests

start ([todo internal name (i)])


end ([todo internal name (i)])