Template:Doc/subpage:zh-cn
This page has not been fully translated.You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the
alternate languages guide.
用法
{{{base}}}, {{{l4d2}}}, and {{{noscroll}}} are accepted just as they are for Template:I BaseEntity:zh-cn.
Default:TriggerOnce:
- Toggle
- 在启用和禁用状态之间切换此触发器。
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文列表。格式是
<key>:<value>。
- AddOutput <string>
- 在此实体上分配新的键值/输出。对于键值,有些依赖于额外的必要代码来运行,如果它只是通过这个输入改变就行不通。必须遵循严格的格式:
语法:// 更改键值的格式: "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"
- ClearContext
- 从此实体的列表中删除所有上下文。
- ClearParent
- 从移动层次结构中删除该实体,使其可以自由移动。
- FireUser1 to FireUser4
- 触发相应的
OnUser输出;详见 User Inputs and Outputs。
- Kill
- 从这个世界中删除此实体。
- KillHierarchy
- 功能类似
Kill,尽管此实体与其父实体都被删除了,但比Kill快一点。
- RemoveContext
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- SetParent <string>
- 跟随此实体移动,详见 实体层级(依赖关系)。
- SetParentAttachment <string>
- 更改此实体到其父级上的特定附属点。实体将传送,以至于其骨骼方位与附属匹配。在使用此输入前必须设置好实体的父实体。
- SetParentAttachmentMaintainOffset <string>
- 同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
- Use !FGD
- 与调用 +use 的玩家相同[玩家按 +use(使用,默认E按钮)];大多数情况下没有影响。
- DispatchResponse <string> !FGD
- 向实体发送一个上下文。 详见 Response 和 Concept.
- DispatchEffect <string> (removed since
) !FGD
- 在实体的原点坐标设置一个特定效果;参见 List of Client Effects。自从
Left 4 Dead后由粒子系统取代。
- RunScriptFile <script> (in all games since
)
- 从硬盘执行一个 VScript 脚本文件,不带文件后缀名。会合并接收实体的脚本域。
- RunScriptCode <string> (in all games since
)
- 在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。
Bug:在 Hammer 中,使用带有字符串的参数会破坏 VMF 文件的结构,使下一个 Hammer 会话无法查看该文件。 [todo tested in ?]
Fix:使用文本编辑器手动删除带有字符串的参数。
- CallScriptFunction <string> (in all games since
) !FGD
- 在接受实体脚本域上执行一段 VScript 函数。
- SetLocalOrigin <coordinates> (in all games since
) !FGD
- 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
- SetLocalAngles <angles> (in all games since
) !FGD
- 设置该实体的角度。
EnableDisable/启动禁用:
- Enable
- Disable
- 启动/禁用此实体所具备的效果。同样会使实体消失。
noscroll 和 base:TriggerOnce:
- Toggle
- 在启用和禁用状态之间切换此触发器。
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文列表。格式是
<key>:<value>。
- AddOutput <string>
- 在此实体上分配新的键值/输出。对于键值,有些依赖于额外的必要代码来运行,如果它只是通过这个输入改变就行不通。必须遵循严格的格式:
语法:// 更改键值的格式: "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"
- ClearContext
- 从此实体的列表中删除所有上下文。
- ClearParent
- 从移动层次结构中删除该实体,使其可以自由移动。
- FireUser1 to FireUser4
- 触发相应的
OnUser输出;详见 User Inputs and Outputs。
- Kill
- 从这个世界中删除此实体。
- KillHierarchy
- 功能类似
Kill,尽管此实体与其父实体都被删除了,但比Kill快一点。
- RemoveContext
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- SetParent <string>
- 跟随此实体移动,详见 实体层级(依赖关系)。
- SetParentAttachment <string>
- 更改此实体到其父级上的特定附属点。实体将传送,以至于其骨骼方位与附属匹配。在使用此输入前必须设置好实体的父实体。
- SetParentAttachmentMaintainOffset <string>
- 同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
- Use !FGD
- 与调用 +use 的玩家相同[玩家按 +use(使用,默认E按钮)];大多数情况下没有影响。
- DispatchResponse <string> !FGD
- 向实体发送一个上下文。 详见 Response 和 Concept.
- DispatchEffect <string> (removed since
) !FGD
- 在实体的原点坐标设置一个特定效果;参见 List of Client Effects。自从
Left 4 Dead后由粒子系统取代。
EnableDisable/启动禁用:
- Enable
- Disable
- 启动/禁用此实体所具备的效果。同样会使实体消失。
See also
{{Fl TriggerOnce:zh-cn}}
{{KV TriggerOnce:zh-cn}}
{{O TriggerOnce:zh-cn}}
{{KV BaseEntity:zh-cn}}