Template:I BaseEntity/strings: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Strings subpage | number = 23 | en = 23 | zh = 23 }} * {{I BaseEntity/strings|AddContext}} * {{I BaseEntity/strings|AddOutputDesc}} * {{I BaseEntity/strings|ClearContext}} *...")
 
No edit summary
 
Line 34: Line 34:
     }}
     }}
|AddOutputDesc={{#switch:{{Language}}
|AddOutputDesc={{#switch:{{Language}}
     |#default=Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
     |#default=Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:{{Expand|<syntaxhighlight lang="PowerShell">
     |zh=为此实体分配一个新的键值/输出。对于键值,有些依赖于额外的代码,不能仅通过此输入进行更改。必须遵循严格的格式:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"
 
// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
</syntaxhighlight>| Syntax<nowiki>:</nowiki>}}
     |zh=为此实体分配一个新的键值/输出。对于键值,有些依赖于额外的代码,不能仅通过此输入进行更改。必须遵循严格的格式:{{Expand|<syntaxhighlight lang="PowerShell">
// 更改键值的格式: "AddOutput [键] [值]"
//// 原始文本:
"OnUser1" "!self,AddOutput,targetname new_name"
 
// 添加输出的格式: "AddOutput {目标名称}:{输入名称}:{参数}:{延迟}:{最大触发次数,-1 代表无限}"
//// 原始文本:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// 参数可以留空,但仍应包含空的空白。
//// 原始文本:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
</syntaxhighlight>| 语法<nowiki>:</nowiki>}}
     }}
     }}
|ClearContext={{#switch:{{Language}}
|ClearContext={{#switch:{{Language}}

Latest revision as of 20:50, 13 August 2024

English (en)中文 (zh)
Icon-settings.png
Subpage of strings
It contains various translatable and untranslatable strings that are used in the template or anywhere else.
Icon-gnome-document-open.pngDocumentation
Number of strings:23
Approximate status of translation:English (en) 100% 中文 (zh) 100% 
  • Adds to the entity's list of response contexts. See Context.
  • Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed: {| class="mw-collapsible mw-collapsed" style="background:rgba(0,0,0,0.05) ;float:no;margin-bottom:1em;margin-left:0;padding-right:0.5em;border:1px solid rgba(255,255,255,0.1); border-left:solid 1px #8bb9e0; padding-left:1em;"

|+ style="text-align:left; white-space:nowrap; font-weight:bold; color:#ddd; " |

|

// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"

// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"

|}

  • Removes all contexts from this entity's list.
  • Removes this entity from the movement hierarchy, leaving it free to move independently.
  • Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
  • Removes this entity and any entities parented to it from the world.
  • Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKillinput.
  • Remove a context from this entity's list. The name should match the key of an existing context.
  • Move with this entity. See Entity Hierarchy (parenting).
  • Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
  • As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
  • Same as a player invoking +use; no effect in most cases.
  • Changes this entity's team.
  • This input changes value for TeamNum property.
  • Dispatches a response to the entity. See Response and Concept.
  • Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since Left 4 Dead.
  • Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
  • 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.
  • Execute a VScript function in the scope of the receiving entity.
  • Calls a VScript function defined in the scope of the receiving entity.
  • Destroys the script scope of the receiving entity.
  • 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.
  • Set this entity's angles.