Template:I BaseEntity:zh-cn/doc
Jump to navigation
Jump to search
显示特定于游戏的信息
Template:Documentation subpage:zh-cn
继承CBaseEntity class 的所有相关输入的信息持有者。模板参数对于显示适当的信息至关重要,因为这些年来新游戏增加了新功能。有关命名参数的更多信息,请参见 Help:Templates。
此处并未涵盖CBaseEntity的所有输入。但是您可以在 Uncovered Keyvalues 页面看到它们。
用法
这些必须以特定的语法使用!——所有参数的值都必须为 1,例如:as=1
.。一次只能使用一个游戏参数。
{{I BaseEntity:zh-cn|as=1}}
参数
如果您将参数字段留空(不使用参数),模板将自动回退以显示当前默认游戏的键值。
此模板的所有参数:
base
- 仅显示与首次添加时相关的信息l4d2
- 包含特定于的信息(VScripts)
as
- 包括特定于的信息(SetLocalOrigin 和 SetLocalAngles)
已弃用的内容:
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.)tf2
-(DEPRECATED 28/4/2021: Was only used to showSetTeam
keyvalue's TF2 specific information. Use{{I TeamNum}}
insteadwhen it starts to exist...)
有关示例,请参阅示例部分。
示例
显示特定于游戏的信息 
{{I BaseEntity:zh-cn|as=1}}
将会:
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文列表。格式是
<key>:<value>
。
语法:
- ClearContext
- 从此实体的列表中删除所有上下文。
- ClearParent
- 从移动层次结构中删除该实体,使其可以自由移动。
- FireUser1 to FireUser4
- 触发相应的
OnUser
输出;详见 User Inputs and Outputs。
- Kill
- 从这个世界中删除此实体。
- KillHierarchy
- 功能类似
Kill
,尽管此实体与其父实体都被删除了,但比Kill
快一点。
- RemoveContext
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- SetParent <string>
- 跟随此实体移动,详见 实体层级(依赖关系)。
- SetParentAttachmentMaintainOffset <string>
- 同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
- RunScriptCode <string> (in all games since
)
- 在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。
Fix:使用文本编辑器手动删除带有字符串的参数。
- SetLocalOrigin <coordinates> (in all games since
) !FGD
- 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
显示其基本的信息
{{I BaseEntity:zh-cn|base=1}}
将会:
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文列表。格式是
<key>:<value>
。
语法:
- ClearContext
- 从此实体的列表中删除所有上下文。
- ClearParent
- 从移动层次结构中删除该实体,使其可以自由移动。
- FireUser1 to FireUser4
- 触发相应的
OnUser
输出;详见 User Inputs and Outputs。
- Kill
- 从这个世界中删除此实体。
- KillHierarchy
- 功能类似
Kill
,尽管此实体与其父实体都被删除了,但比Kill
快一点。
- RemoveContext
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- SetParent <string>
- 跟随此实体移动,详见 实体层级(依赖关系)。
- SetParentAttachmentMaintainOffset <string>
- 同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
- DispatchResponse <string> !FGD
- 向实体发送一个上下文。 详见 Response
和 Concept
.
- DispatchEffect <string> (removed since
) !FGD
- 在实体的原点坐标设置一个特定效果;参见 List of Client Effects
。自从
Left 4 Dead后由粒子系统取代。
显示所有游戏的信息
显示此模板可以显示的此键的每个游戏信息。
{{I BaseEntity:zh-cn}}
将会:
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文列表。格式是
<key>:<value>
。
语法:
- ClearContext
- 从此实体的列表中删除所有上下文。
- ClearParent
- 从移动层次结构中删除该实体,使其可以自由移动。
- FireUser1 to FireUser4
- 触发相应的
OnUser
输出;详见 User Inputs and Outputs。
- Kill
- 从这个世界中删除此实体。
- KillHierarchy
- 功能类似
Kill
,尽管此实体与其父实体都被删除了,但比Kill
快一点。
- RemoveContext
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- SetParent <string>
- 跟随此实体移动,详见 实体层级(依赖关系)。
- SetParentAttachmentMaintainOffset <string>
- 同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
- DispatchResponse <string> !FGD
- 向实体发送一个上下文。 详见 Response
和 Concept
.
- DispatchEffect <string> (removed since
) !FGD
- 在实体的原点坐标设置一个特定效果;参见 List of Client Effects
。自从
Left 4 Dead后由粒子系统取代。
- RunScriptCode <string> (in all games since
)
- 在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。
Fix:使用文本编辑器手动删除带有字符串的参数。
- SetLocalOrigin <coordinates> (in all games since
) !FGD
- 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
另请参阅
{{KV BaseEntity}}
{{KV BaseAnimating}}
{{I BaseAnimating}}