Template:I BaseEntity:zh-cn: Difference between revisions
(Created page with "<noinclude>{{otherlang2 |noborder=true |ru=Template:I_BaseEntity:ru |zh-cn=Template:I_BaseEntity:zh }}__NOTOC__ This template is our holder for all inputs assigned throug...") |
No edit summary |
||
Line 2: | Line 2: | ||
|noborder=true | |noborder=true | ||
|ru=Template:I_BaseEntity:ru | |ru=Template:I_BaseEntity:ru | ||
| | |en=Template:I_BaseEntity | ||
}}__NOTOC__ | }}__NOTOC__ | ||
Revision as of 06:42, 12 October 2019
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).
- SetParentAttachmentMaintainOffset <字符串>
- 同上,但不传送。实体接受到此输出后保留与父级的相对位置。
- ClearParent
- 取消绑定父实体,以至于此实体可以自由行动。
- AddOutput <字符串>
- 评估此实体的输出/键值(类似于增加输出给某实体)。
格式:<key/键> <value/值>
格式:<output name/输出名> <targetname/目标名>:<inputname/输入名>:<parameter/参数>:<delay/延迟>:<最大触发数,-1代表无限。>
- FireUser1 to FireUser4
- 触发
OnUser
输出; 详见 User Inputs and Outputs。
- AddContext <字符串>
- 添加到实体的response contexts/响应上下文列表。格式
<key/键>:<value/值>
.
- RemoveContext <字符串>
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- ClearContext <字符串>
- 删除实体的所有上下文。
- RunScriptFile <script> (in all games since
)
- 从硬盘执行一个VScript脚本文件,不带文件后缀名。会合并接收实体的脚本域。