Difference between revisions of "Template:I BaseEntity"

From Valve Developer Community
Jump to: navigation, search
m (Added Template:Lang)
m (brackets typo fix)
(One intermediate revision by the same user not shown)
Line 36: Line 36:
 
<!-- IF: L4D2 -->{{#if:{{{l4d2|}}}|
 
<!-- IF: L4D2 -->{{#if:{{{l4d2|}}}|
 
{{IO|RunScriptFile|Execute a [[VScript]] file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.|param=script|since={{l4d2}}}}
 
{{IO|RunScriptFile|Execute a [[VScript]] file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.|param=script|since={{l4d2}}}}
{{IO|RunScriptCode|Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. {{bug|In {{l4d2}}, the code is executed in the script scope of the entity that fires the output, ''not'' the one receiving the input.}} {{warning|Never try to pass string parameters to a script function with this input. It will corrupt the [[VMF]] structure because of the nested quotation marks, which then must be removed manually with a text editor.}}|param=string|since={{l4d2}}}}
+
{{IO|RunScriptCode|Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. {{Bugfix|In Hammer, using string arguments will corrupt the [[VMF]] file's structure, making the file unviewable for the next Hammer session.|Remove the string argument manually with a text editor.}}|param=string|since={{l4d2}}}}
 
{{IO|CallScriptFunction|Execute a VScript function in the scope of the receiving entity.|param=string|since={{l4d2}}|nofgd=1}}
 
{{IO|CallScriptFunction|Execute a VScript function in the scope of the receiving entity.|param=string|since={{l4d2}}|nofgd=1}}
<!-- {{portal2|}}} is for legacy support -->
+
<!-- {{portal2|}}} was for legacy support -->
| <!-- ELSE IF: AS / P2 --> {{#if:{{{as|}}}{{{portal2|}}}|
+
| <!-- ELSE IF: NOT BASE [AS / P2] -->{{#if:{{{base|}}}||
{{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.}}
 
| <!-- ELSE IF: NOT BASE -->{{#if:{{{base|}}}||
 
 
{{IO|RunScriptFile|Execute a [[VScript]] file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.|param=script|since={{l4d2}}}}
 
{{IO|RunScriptFile|Execute a [[VScript]] file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.|param=script|since={{l4d2}}}}
{{IO|RunScriptCode|Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. {{bug| In {{l4d2}}, the code is executed in the script scope of the entity that fires the output, ''not'' the one receiving the input.}} {{warning|Never try to pass string parameters to a script function with this input. It will corrupt the [[VMF]] structure because of the nested quotation marks, which then must be removed manually with a text editor.}}|param=string|since={{l4d2}}}}
+
{{IO|RunScriptCode|Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. {{Bugfix|In Hammer, using string arguments will corrupt the [[VMF]] file's structure, making the file unviewable for the next Hammer session.|Remove the string argument manually with a text editor.}}|param=string|since={{l4d2}}}}
 
{{IO|CallScriptFunction|Execute a VScript function in the scope of the receiving entity.|param=string|since={{l4d2}}|nofgd=1}}
 
{{IO|CallScriptFunction|Execute a VScript function in the scope of the receiving entity.|param=string|since={{l4d2}}|nofgd=1}}
 
{{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.}}<!-- -->}}}}
-->}}}}}}
 
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>

Revision as of 16:53, 17 September 2021

English Русский 简体中文


Template icon Template documentation[view] [edit] [history] [purge]

Info holder of all relevant inputs inheriting theCBaseEntity C++ class. Template parameters are vital in displaying the appropiate info, because new games have added new features throughout the years. See Help:Templates for more info on named parameters.

Not allCBaseEntityinputs are not covered here. But you can see them all at the Uncovered Keyvalues page.

Note.png Note: If you want to edit something on this template, please make sure you edit it in both places. Per-game keyvalues are duplicated, for technical reasons. Also see FGD Template Prototype.

Usage

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

{{I BaseEntity|as=1}}

Parameters

If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying keyvalues from the current default game.

All parameters for this template:

  • base- Shows only information relevant to when it was initially added for the first time
  • l4d2- Include info specific to Left 4 Dead 2 (VScripts)
  • as- [CURRENT DEFAULT] Include info specific to Alien Swarm (SetLocalOrigin and SetLocalAngles)


Show Deprecated:  

Refer to the Examples section for samples.

Examples

Show info specific to a game Alien Swarm

This makes information relevant only to Alien Swarm be displayed.

{{I BaseEntity|as=1}}


will: 

Show info for its base

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

{{I BaseEntity|base=1}}


will: 

Show information for all games

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

{{I BaseEntity}}


will: 

See Also