Template:I BaseEntity:zh-cn
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.)

For full documentation on this family of templates, see FGD Template Prototype. Still confused on something? Ask for help before editing this template.

CBaseEntity
inputs are not covered here. See the talk page.基础:
Kill
- 从这个世界中删除此实体。
KillHierarchy
- 功能类似于
Kill
,尽管此实体与其父实体都被删除了,但比Kill
快一点。 SetParent
<字符串>
- 跟随此实体移动,详见Entity Hierarchy (parenting).
SetParentAttachment
<字符串>
- 修改此实体到父实体的特定附属点。实体会传送,以至于其骨骼方位与附属匹配。在使用此输入前必须设置好实体的父实体。
SetParentAttachmentMaintainOffset
<字符串>
- 同上,但不传送。实体接受到此输出后保留与父级的相对位置。
ClearParent
- 取消绑定父实体,以至于此实体可以自由行动。
AddOutput
<字符串>
- 评估此实体的输出/键值(类似于增加输出给某实体)。
格式:<key/键> <value/值>
格式:<output name/输出名> <targetname/目标名>:<inputname/输入名>:<parameter/参数>:<delay/延迟>:<最大触发数,-1代表无限。>
FireUser1
toFireUser4
- 触发
OnUser
输出; 详见 User Inputs and Outputs。 Use
!FGD- 类似于玩家按 +use(使用,默认E按钮); 也许不会做什么事! 也可以通过创建未指定的输入来调用输出。
这个输入不存在于Valve的 FGD中。 DispatchEffect
<字符串>
!FGD- 在实体的原点坐标设置一个特定效果。自从
后由粒子系统取代。
DispatchResponse
<字符串>
!FGD- 向实体发送一个上下文。 详见 Response 和 Concept.
AddContext
<字符串>
- 添加到实体的response contexts/响应上下文列表。格式
<key/键>:<value/值>
. RemoveContext
<字符串>
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
ClearContext
<字符串>
- 删除实体的所有上下文。
RunScriptFile
<script>
(in all games since)
- 从硬盘执行一个VScript脚本文件,不带文件后缀名。会合并接收实体的脚本域。
RunScriptCode
<字符串>
(in all games since)
- (执行脚本代码。)执行一段接收实体域的脚本源代码。通过控制台触发,可能需要英文双引号。
警告:切勿在此输入的元素内使用字符串!它将破坏VMF ,由嵌套引号引起!你必须用文本编辑器手动删除来修复!
CallScriptFunction
<字符串>
(in all games since) !FGD
- 在接受实体脚本域上执行一段vscript函数。
SetLocalOrigin
<坐标>
(in all games since) !FGD
- 将此实体设置到地图上某点。如果此实体是某实体父级,那么它的子级也会随着偏移。
SetLocalAngles
<角度>
(in all games since) !FGD
- 设置实体的角度(朝向)。