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

From Valve Developer Community
Jump to navigation Jump to search
m (SetTeam input, is this too rudimentary? idk)
(Eh since I already made an edit to the VDC, here's SetTeam with more proper info for l4ds + csgo, and edited how the template displays in this page. Can't make the TF2 specific info display auto by default, sry. Check out version history to see more)
Line 14: Line 14:
*<code>portal2</code>
*<code>portal2</code>
*<code>prel4d</code> - (DEPRECATED 9/28/18: This parameter existed to hide DispatchEffect for games (ones before l4d) that did not have it. There's many cases of similar inputs and keyvalues that aren't in absolutely everything, and making similar parameters for all of those simply isn't worth the trouble, especially considering having to comb through every existing use of those templates. Parameter is totally removed from code and affects nothing.)
*<code>prel4d</code> - (DEPRECATED 9/28/18: This parameter existed to hide DispatchEffect for games (ones before l4d) that did not have it. There's many cases of similar inputs and keyvalues that aren't in absolutely everything, and making similar parameters for all of those simply isn't worth the trouble, especially considering having to comb through every existing use of those templates. Parameter is totally removed from code and affects nothing.)
*<code>tf2</code> Modifies the<code>TeamNum</code> keyvalue to show tf2 related info.
{{note|If you want to edit something on this template, please make sure you edit it in both places. ''Per-game'' inputs are duplicated, for complex technical reasons.}}
{{note|If you want to edit something on this template, please make sure you edit it in both places. ''Per-game'' inputs are duplicated, for complex technical reasons.}}
For full documentation on this family of templates, see [[FGD Template Prototype]]. Still confused on something? '''Ask for help''' before editing this template.
For full documentation on this family of templates, see [[FGD Template Prototype]]. Still confused on something? '''Ask for help''' before editing this template.
Line 19: Line 20:
[[Category:Input Templates|Global]]
[[Category:Input Templates|Global]]
----
----
{{I BaseEntity}}
</noinclude><!--
</noinclude><!--
-->{{minititle|Base}}
--><includeonly>{{minititle|Base}}
{{IO|Kill|Removes this entity and any entities parented to it from the world.}}
{{IO|Kill|Removes this entity and any entities parented to it from the world.}}
{{IO|KillHierarchy|Functions the same as <code>Kill</code>, although this entity and any entities parented to it are killed on the same frame, being marginally faster than <code>Kill</code>.}}
{{IO|KillHierarchy|Functions the same as <code>Kill</code>, although this entity and any entities parented to it are killed on the same frame, being marginally faster than <code>Kill</code>.}}
Line 29: Line 31:
{{IO|[[AddOutput]]|Evaluates a keyvalue/output on this entity. <br/>Format: <code><key> <value></code><br/>Format: <code><output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite></code>|param=string}}
{{IO|[[AddOutput]]|Evaluates a keyvalue/output on this entity. <br/>Format: <code><key> <value></code><br/>Format: <code><output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite></code>|param=string}}
{{IO|FireUser1|to=FireUser4|Fire the <code>OnUser</code> outputs; see [[User Inputs and Outputs]].}}
{{IO|FireUser1|to=FireUser4|Fire the <code>OnUser</code> outputs; see [[User Inputs and Outputs]].}}
{{IO|SetTeam|Change the team of this entity to the team using this number.|param=int}}
{{IO|Use|Same as a player invoking [[+use]]; may not do anything. Can also be invoked by creating an output that does not specify an input.<br /> This input is not included in Valve's [[FGD]]s.|nofgd=1}}
{{IO|Use|Same as a player invoking [[+use]]; may not do anything. Can also be invoked by creating an output that does not specify an input.<br /> This input is not included in Valve's [[FGD]]s.|nofgd=1}}
{{IO|DispatchEffect|Dispatches a special effect from the entity's origin. Removed and replaced entirely by the [[particle]] system since {{l4d}}.|param=string|removed={{l4d}}|nofgd=1}}
{{IO|DispatchEffect|Dispatches a special effect from the entity's origin. Removed and replaced entirely by the [[particle]] system since {{l4d}}.|param=string|removed={{l4d}}|nofgd=1}}
Line 49: Line 50:
{{IO|SetLocalOrigin|param=coordinates|since={{as}}|nofgd=1|Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.}}
{{IO|SetLocalOrigin|param=coordinates|since={{as}}|nofgd=1|Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.}}
{{IO|SetLocalAngles|param=angles|since={{as}}|nofgd=1|Set this entity's angles.}}<!--
{{IO|SetLocalAngles|param=angles|since={{as}}|nofgd=1|Set this entity's angles.}}<!--
-->}}}}}}
-->}}}}}}<!--
SetTeam related things go here
--> {{#if:{{{tf2|}}}|
{{IO|SetTeam|Reassign the team of this entity as the team using this number.
:*0: None
:*1: Spectator
:*2: Red {{tf2}}
:*3: Blue {{tf2}} <!--
-->|param=choices|nofgd=1 }}<!--
-->| }} {{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}|
{{IO|SetTeam|Doesn't do anything in {{l4ds}}.
:{{todo|Does this work in {{css}}?}}
<!--
:*0: None
:*1: Spectator
:*2: Survivors {{l4ds}}, Counter-Terrorist {{css}}
:*3: Infected {{l4ds}} Terrorist {{css}}
-->
<!--
-->|deprecated=1|nofgd=1 }}<!--
-->| }}}}}} {{#if:{{{csgo|}}}|
{{IO|SetTeam|Only<code>TeamNum</code>works in {{csgo}}.|deprecated=1}}
{{IO|TeamNum|Reassign the team of this entity as the team using this number.
:*0: None
:*1: Spectator
:*2: Terrorists {{csgo}}
:*3: Counter-Terrorists {{csgo}}<!--
-->|param=choices|only={{csgo}}|nofgd=1 }} <!--
-->| }}</includeonly>

Revision as of 04:22, 31 March 2021

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

This template is our holder for all inputs assigned through CBaseEntity. The template has a very specific syntax that you must follow to apply properly, because new games have added new features throughout the years. See Help:Templates for more info on named parameters.

{{I BaseEntity}}

No parameters: display inputs for ALL games.

{{I BaseEntity|base=1}}

Base: display inputs that have only existed since whatever game added the class (most have existed since HL2, the first Source game).

{{I BaseEntity|l4d2=1}}

Game as a parameter: display the inputs that base displays, AND inputs that were added to the class, by the specified game. You can specify as many games as needed. You must specify ALL the games you want to include (e.g. l4d2 will not automatically include l4d inputs as well).

All parameters for this template:

  • base
  • l4d2
  • portal2
  • prel4d - (DEPRECATED 9/28/18: This parameter existed to hide DispatchEffect for games (ones before l4d) that did not have it. There's many cases of similar inputs and keyvalues that aren't in absolutely everything, and making similar parameters for all of those simply isn't worth the trouble, especially considering having to comb through every existing use of those templates. Parameter is totally removed from code and affects nothing.)
  • tf2 Modifies theTeamNum keyvalue to show tf2 related info.
Note.pngNote:If you want to edit something on this template, please make sure you edit it in both places. Per-game inputs are duplicated, for complex technical reasons.

For full documentation on this family of templates, see FGD Template Prototype. Still confused on something? Ask for help before editing this template.

Note.pngNote:Some CBaseEntity inputs are not covered here. See the talk page.