Template:KV BaseEntity:zh-cn

From Valve Developer Community
(Redirected from Template:KV BaseEntity:zh)
Jump to: navigation, search
English Русский 

This template is our holder for all keyvalues that are 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.

{{KV BaseEntity}}

No parameters: display keyvalues for ALL games.

{{KV BaseEntity|base=1}}

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

{{KV BaseEntity|l4d2=1}}

Game as a parameter: display the keyvalues that base displays, AND keyvalues 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 keyvalues as well). This is because there are situations like in Portal 2, where the output OnKilled is not available through CBaseEntity, despite being a far descendant of the L4D branch which added it.

All parameters for this template:

  • base (Use if the entity was available before L4D2.)
  • l4d (DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things. They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)
  • l4d2
  • csgo
  • css (DEPRECATED 10/1/18: Previously used for a notice that was thought to apply to all entities in CS:S. The purpose of this now exists in Template:PreservedEnt. This is completely removed from the template and won't affect anything.)
  • brush (This adds things common for all brush entities, visible or not. For visible ones, use Template:KV visiblebrush in conjunction.)
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.

See FGD Template Prototype.

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

Base:

Classname (classname) <string>
实体名称。实体名称可以用AddOutput来修改,有可能导致错误,影响引擎的处理方式。
Name (targetname) <string>
自己可定义的实体名字,注意,classname是实体名(如prop_static)而不是其名字!
Global Entity Name (globalname) <string>
实体链接到下一张图采用的名称,当玩家过度到下一张图的时候,会保持上一张图实体的状态。
Parent (parentname) <targetname>
实体的父级实体,该实体可以与父实体保持移动偏移。名称后面可以添加一个附属点,以逗号隔开。 任何实体都可以是父实体,甚至是点实体。 转换至下一张地图的实体关系会依然存在。例如 trigger_transition, 一些不适合做父实体的实体可能难以运行,利用 phys_constraint 可以解决。*注:翻译略有出入,请只在意第一句或查看原文(英文)。
Origin (X Y Z) (origin) <coordinates>
实体处于世界中的位置,旋转实体会以实体坐标原点旋转。
Pitch Yaw Roll (X Y Z) (angles) <angle>
实体在世界中的方位,Pitch围绕X轴旋转,可以称为俯仰角。Yaw围绕Z轴旋转,可以称为偏航角,roll围绕Y轴旋转,可以称为翻滚角。
注意:尽管Hammer不显示新角度,但其仍然适用于固实体。
Flags (spawnflags) <integer>
实体所具有的标志/标签,依实体所具有而定。
Response Contexts (ResponseContext) <string>
实体预定义的响应上下文(链接上下文)。格式:key:value,key:value,...。可以由filtered过滤。
Effects (effects) <integer> !FGD
效果标志,在hammer中不显示,但它确确存在。
Local Time (ltime) <float> !FGD
实体的本地时间,区别于全局时间,主要用于物理效果计算,在hammer中不显示。
Next Think (nextthink) <float> !FGD
实体再次 thinks 时间。在hammer中不显示。
Hammer ID (hammerid) <integer> !FGD
实体的Hammer ID。主要用于插件和debug指令,如ent_keyvalue. 可以用"hammerid" 或者 "id" 键值来手动分配. 在run-time时候生成的实体不会分配ID。在hammer中不显示。
Disable for Xbox 360 (disableX360) <boolean> (New with Left 4 Dead 2) !FGD
如果设置为"Yes",在XBOX360游戏机上不显示此实体。
Entity Scripts (vscripts) <scriptlist> (New with Left 4 Dead 2)
实体生成后可通过输出调用的VScript脚本文件,所有脚本都处于同一脚本域,会覆盖相同名称的变量和功能函数等。
Script think function (thinkfunction) <string> (New with Left 4 Dead 2)
脚本功能函数名,每秒自动会调用此函数10次,比较于logic_timer更方便。 请避免 expensive(昂贵)的效果操作,会损失性能。
Lag Compensation (LagCompensate) <boolean> (New with Left 4 Dead 2) !FGD
设置"Yes"会延迟补偿该实体,请谨慎使用。在hammer中不显示。
Is Automatic-Aim Target (is_autoaim_target) <boolean> (New with Counter-Strike: Global Offensive) !FGD
设置为"1"会减慢该实体在十字准心下方时,控制杆的瞄准运动。