Template:I BaseEntity:zh-cn

From Valve Developer Community
Revision as of 08:59, 16 October 2019 by FloraC (talk | contribs) (FloraC moved page Template:I BaseEntity:zh to Template:I BaseEntity:zh-cn: Ditto)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
English Русский

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.)
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.

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


SetParent  <字符串>
跟随此实体移动,详见Entity Hierarchy (parenting).
SetParentAttachment  <字符串>
SetParentAttachmentMaintainOffset  <字符串>
AddOutput  <字符串>
格式: <key/键> <value/值>
格式: <output name/输出名> <targetname/目标名>:<inputname/输入名>:<parameter/参数>:<delay/延迟>:<最大触发数,-1代表无限。>
FireUser1 to FireUser4
触发OnUser输出; 详见 User Inputs and Outputs
Use  !FGD
类似于玩家按 +use(使用,默认E按钮); 也许不会做什么事! 也可以通过创建未指定的输入来调用输出。
这个输入不存在于Valve的 FGD中。
DispatchEffect  <字符串> !FGD
在实体的原点坐标设置一个特定效果。自从<Left 4 Dead>后由粒子系统取代。
DispatchResponse  <字符串> !FGD
向实体发送一个上下文。 详见 ResponseConcept.
AddContext  <字符串>
添加到实体的response contexts/响应上下文列表。格式<key/键>:<value/值>.
RemoveContext  <字符串>
ClearContext  <字符串>
RunScriptFile  <script> (New with Left 4 Dead 2)
RunScriptCode  <字符串> (New with Left 4 Dead 2)
Bug: <Left 4 Dead 2>中,该代码是触发输出的实体的脚本域中执行, 接受输入的实体。
警告:切勿在此输入的元素内使用字符串!它将破坏VMF ,由嵌套引号引起!你必须用文本编辑器手动删除来修复!
CallScriptFunction  <字符串> (New with Left 4 Dead 2) !FGD
SetLocalOrigin  <坐标> (New with Alien Swarm) !FGD
SetLocalAngles  <角度> (New with Alien Swarm) !FGD