From Valve Developer Community
Jump to navigation
Jump to search
|
|
| Line 13: |
Line 13: |
| // 添加输出的格式: "AddOutput {目标名称}:{输入名称}:{参数}:{延迟}:{最大触发次数,-1 代表无限}" | | // 添加输出的格式: "AddOutput {目标名称}:{输入名称}:{参数}:{延迟}:{最大触发次数,-1 代表无限}" |
| //// 原始文本: | | //// 原始文本: |
| "OnUser1" "!self:SetParent:!activator:0.0:-1" | | "OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1" |
| // 参数可以留空,但仍应包含空的空白。 | | // 参数可以留空,但仍应包含空的空白。 |
| //// 原始文本: | | //// 原始文本: |
| "OnUser1" "!self:ClearParent::0.0:-1" | | "OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1" |
| </syntaxhighlight>| 语法<nowiki>:</nowiki>}}|param=string }} | | </syntaxhighlight>| 语法<nowiki>:</nowiki>}}|param=string }} |
| {{IO:zh-cn|ClearContext|从此实体的列表中删除所有上下文。}} | | {{IO:zh-cn|ClearContext|从此实体的列表中删除所有上下文。}} |
Revision as of 23:44, 28 July 2022
Template:Doc/subpage:zh-cn
继承CBaseEntityclass 的所有相关输入的信息持有者
。模板参数对于显示适当的信息至关重要,因为这些年来新游戏增加了新功能。有关命名参数的更多信息,请参见 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 showSetTeamkeyvalue's TF2 specific information. Use {{I TeamNum}} insteadwhen it starts to exist...)
有关示例,请参阅示例部分。
示例
显示特定于游戏的信息 
这使得仅显示与
相关的信息。
{{I BaseEntity:zh-cn|as=1}}
将会:
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
列表。格式是
<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>
- 跟随此实体移动,详见 实体层级(依赖关系)
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
。
- 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
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
后由
粒子系统取代。
- RunScriptFile <script> (in all games since
)
- 从硬盘执行一个 VScript
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
脚本文件,不带文件后缀名。会合并接收实体的脚本域。
- RunScriptCode <string> (in all games since
)
- 在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。Template:Bug:zh-cn
修复:使用文本编辑器手动删除带有字符串的参数。
- CallScriptFunction <string> (in all games since
) !FGD
- 在接受实体脚本域上执行一段 VScript 函数。
- SetLocalOrigin <coordinates> (in all games since
) !FGD
- 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
- SetLocalAngles <angles> (in all games since
) !FGD
- 设置该实体的角度。
显示其基本的信息
仅显示与基础引擎相关的信息。 (
/
)
{{I BaseEntity:zh-cn|base=1}}
将会:
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
列表。格式是
<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>
- 跟随此实体移动,详见 实体层级(依赖关系)
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
。
- 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
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
后由
粒子系统取代。
显示所有游戏的信息
显示此模板可以显示的此键的每个游戏信息。
{{I BaseEntity:zh-cn}}
将会:
Base:
- AddContext <string>
- 添加到实体的 Response Contexts/响应上下文
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
列表。格式是
<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>
- 跟随此实体移动,详见 实体层级(依赖关系)
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
。
- 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
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
后由
粒子系统取代。
- RunScriptFile <script> (in all games since
)
- 从硬盘执行一个 VScript
This template has been marked as a candidate for speedy deletion for the following reason:If you object to this decision, then please discuss why
here (If you make a discussion section also
create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.
脚本文件,不带文件后缀名。会合并接收实体的脚本域。
- RunScriptCode <string> (in all games since
)
- 在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。Template:Bug:zh-cn
修复:使用文本编辑器手动删除带有字符串的参数。
- CallScriptFunction <string> (in all games since
) !FGD
- 在接受实体脚本域上执行一段 VScript 函数。
- SetLocalOrigin <coordinates> (in all games since
) !FGD
- 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
- SetLocalAngles <angles> (in all games since
) !FGD
- 设置该实体的角度。
另请参阅
{{KV BaseEntity:zh-cn}}
{{KV BaseAnimating:zh-cn}}
{{I BaseAnimating:zh-cn}}