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

From Valve Developer Community
Jump to navigation Jump to search
(Changed a Tip to Note because for some reason it broke ExpandBoxes and ScrollBoxes. Used ifeq instead of if in some cases. Replaced modern templates with old counterpart.)
m (Used parser functions to avoid duplicate text. Removed ScrollBox/ExpandBox test at the end.)
Line 119: Line 119:
{{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|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|[[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|Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.|nofgd=1}}
{{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}}
{{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|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|The local time of the entity, independent of the global clock. Used mainly for physics calculations.|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|Amount of time before the entity [[Thinking|thinks]] again.|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|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}}
-->
--><!--
<!--
 
   ++ Game Specifics ++
   ++ Game Specifics ++


  IF: L4D2
-->{{#ifexpr: {{{l4d2|0}}} or not {{{base|0}}} |<!-- hides only if L4D2 == 0 and BASE != 0 -->
 
-->{{#ifeq:{{{l4d2|0}}}|0|<!-- if l4d2 == 0
 
  -->{{#ifeq:{{{base|0}}}|0|<!-- if base == 0
 
  IF: NOT L4D2 && NOT BASE [CSGO]
 
-->
{{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|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#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|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|[[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|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|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|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}}
-->
-->}}<!--
 
-->{{#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|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}}<!--
 
-->}}<!--
  -->}}<!-- end if base == 0
 
-->|<!-- else (l4d2 != 0)
 
  IF: L4D2
 
-->{{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.|since=L4D2}}
{{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}}
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}}
<!-- 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}}
 
-->}}<!-- end #ifeq l4d2


-->}}<!-- end ScrollBox
-->}}<!-- end ScrollBox
Line 164: Line 145:


--></onlyinclude></includeonly>
--></onlyinclude></includeonly>
{{ScrollBox|
{{KV BaseEntity}}
}}
----
{{ExpandBox|
{{KV BaseEntity}}
}}

Revision as of 20:44, 8 September 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

Tests

start ([todo internal name (i)])


end ([todo internal name (i)])