Template:KV TeamNum: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(template display for CSGO and BASE reworked)
(Re-organized page's HTML logic)
Line 5: Line 5:
:*1: Spectator
:*1: Spectator
}}
}}
|<!-- ELSE IF: NOT ANY[CSGP, TF2, L4D, L4D2, CSS] -->{{#if:{{{csgo|}}}{{{tf2|}}}{{{l4d|}}}{{{l4d2|}}}{{{css|}}}||
|<!-- ELSE IF: CSGO -->{{#if:{{{csgo|}}}|
{{KV|Initial Team|choices|intn=TeamNum, teamnumber {{only|{{csgo}}}} |Which Team the entity belongs / is assigned to on spawn
{{KV|Initial Team|choices|intn=teamnumber {{csgo}} |Which Team the entity belongs / is assigned to on spawn
:*0: None
:*1: Spectator
:*2: Red {{tf2}}, Survivors {{l4ds}}, Terrorists {{css}} {{csgo}}
:*3: Blue {{tf2}}, Infected {{l4ds}}, Counter-Terrorists {{css}} {{csgo}}
}}
| }}}}<!-- IF NOT: BASE and IF: CSGO -->{{#if:{{{base|}}}||{{#if:{{{csgo|}}}|
{{KV|Initial Team|choices|intn=teamnumber|Which Team the entity belongs / is assigned to on spawn
:*0: None
:*0: None
:*1: Spectator
:*1: Spectator
Line 19: Line 12:
:*3: Counter-Terrorists {{csgo}}
:*3: Counter-Terrorists {{csgo}}
}}
}}
|<!-- ELSE IF: ANY[CSGP, TF2, L4D, L4D2, CSS] -->{{#if:{{{tf2|}}}{{{l4d|}}}{{{l4d2|}}}{{{css|}}}|
|<!-- ELSE IF: TF2 -->{{#if:{{{tf2|}}}|
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn
:*0: None
:*0: None
:*1: Spectator<!-- IF: TF2 -->{{#if:{{{tf2|}}}|
:*1: Spectator
:*2: Red {{tf2}}
:*2: Red {{tf2}}
:*3: Blue {{tf2}}
:*3: Blue {{tf2}}
}}
|<!-- ELSE IF: L4D -->{{#if:{{{l4d|}}}|
|<!-- ELSE IF: L4D -->{{#if:{{{l4d|}}}|
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn
:*0: None
:*1: Spectator
:*2: Survivors {{l4d}}
:*2: Survivors {{l4d}}
:*3: Infected {{l4d}}
:*3: Infected {{l4d}}
}}
|<!-- ELSE IF: L4D2 -->{{#if:{{{l4d2|}}}|
|<!-- ELSE IF: L4D2 -->{{#if:{{{l4d2|}}}|
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn
:*0: None
:*1: Spectator
:*2: Survivors {{l4d2}}
:*2: Survivors {{l4d2}}
:*3: Infected {{l4d2}}
:*3: Infected {{l4d2}}
}}
|<!-- ELSE IF: CSS -->{{#if:{{{css|}}}|
|<!-- ELSE IF: CSS -->{{#if:{{{css|}}}|
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn
:*0: None
:*1: Spectator
:*2: Terrorists {{css}}
:*2: Terrorists {{css}}
:*3: Counter-Terrorists {{css}}
:*3: Counter-Terrorists {{css}}
| }}}}}}}}
}}
}}
}}}}}}
|<!-- ELSE: -->
{{KV|Initial Team|choices|intn=TeamNum, or teamnumber {{csgo}} |Which Team the entity belongs / is assigned to on spawn
:*0: None
:*1: Spectator
:*2: Red {{tf2}}, Survivors {{l4ds}}, Terrorists {{css}} {{csgo}}
:*3: Blue {{tf2}}, Infected {{l4ds}}, Counter-Terrorists {{css}} {{csgo}}
}}
| }}}}}}}}}}}}
}}</includeonly>
}}</includeonly>
<noinclude>
<noinclude>

Revision as of 04:36, 27 June 2021


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)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Main article:  teamnumber

Display information for the TeamNum or teamnumber key in a a consistent and easy to use manner. This key exists for all entities inheriting the CBaseEntity class, but since quite a considerable amount of entities aren't affected by it at all, or in a meaningful enough manner, the information for this key will be documented with this template.

Usage

These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:tf2=1. Only one game parameter can be used at once.

{{KV TeamNum|tf2=1}}
Note.pngNote:Entities with this template should generally have the following input added below: {{I|SetTeam|Sets which team to be aligned with|param=int}}.

Parameters

If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying information from ALL games.

All parameters for this template:

  • base- No game specific information are displayed, and base engine features only. (The Source 2013 / Source 2013 Multiplayer iteration engine)
  • tf2 - Set template KVs specific to Team Fortress 2
  • l4d - Set template KVs specific to Left 4 Dead
  • l4d2 - Set template KVs specific to Left 4 Dead 2
  • css - Set template KVs specific to Counter-Strike: Source
  • csgo - Set template KVs specific to Counter-Strike: Global Offensive


Refer to the Examples section for samples.

Examples

Show info specific to a game Left 4 Dead

This makes information specific to Left 4 Dead be displayed.

{{KV TeamNum|l4d=1}}
TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator
  • 2: Survivors Left 4 Dead
  • 3: Infected Left 4 Dead

Show info for its base

Information relevant only to base engine are displayed. (Source 2013 / Source 2013 Multiplayer)

{{KV TeamNum|base=1}}
TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator

Show information for all games

Shows every game information for this key that this template can display.

{{KV TeamNum}}
will:
TeamNum:
Initial Team (TeamNum, or teamnumber Counter-Strike: Global Offensive) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator
  • 2: Red Team Fortress 2, Survivors Left 4 Dead seriesLeft 4 Dead series, Terrorists Counter-Strike: Source Counter-Strike: Global Offensive
  • 3: Blue Team Fortress 2, Infected Left 4 Dead seriesLeft 4 Dead series, Counter-Terrorists Counter-Strike: Source Counter-Strike: Global Offensive

See also

  • {{KV BaseEntity}}
  • {{I BaseEntity}}