Template:KV BaseEntity:zh-cn

From Valve Developer Community
Revision as of 04:50, 16 October 2019 by FloraC (talk | contribs) (Fix lang template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.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.

See FGD Template Prototype.

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


Classname (classname) <string>
Name (targetname) <string>
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>
Flags (spawnflags) <integer>
Response Contexts (ResponseContext) <string>
Effects (effects) <integer> !FGD
Local Time (ltime) <float> !FGD
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> (in all games since <Left 4 Dead 2>) !FGD
Entity Scripts (vscripts) <scriptlist> (in all games since <Left 4 Dead 2>)
Script think function (thinkfunction) <string> (in all games since <Left 4 Dead 2>)
脚本功能函数名,每秒自动会调用此函数10次,比较于logic_timer更方便。 请避免 expensive(昂贵)的效果操作,会损失性能。
Lag Compensation (LagCompensate) <boolean> (in all games since <Left 4 Dead 2>) !FGD
Is Automatic-Aim Target (is_autoaim_target) <boolean> (in all games since <Counter-Strike: Global Offensive>) !FGD