User:1416006136/Sandbox: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 
		
	
 (Momentary rot button/zh)  | 
				 (Func brush:zh-cn)  | 
				||
| Line 1: | Line 1: | ||
{{  | {{lang|Func brush}}  | ||
本页面的译者及时间为[[User:1416006136|大康]] ([[User talk:1416006136|talk]]) 08:08, 6 January 2022 (PST)。部分内容由机器翻译。  | |||
----  | ----  | ||
{{brush ent:zh-cn|func_brush}}它是具有各种功能的通用笔刷实体。  | |||
它结合了来自 Goldsource 的{{ent|func_wall}}、{{ent|func_illusionary}}和{{ent|func_wall_toggle}}的功能。上述实体现在仍然可以使用,但对内存的节省非常有限。  | |||
{{  | {{PreservedEnt:zh-cn}}  | ||
{{code class:zh-cn|CFuncBrush|modelentities.cpp}}  | |||
{{  | |||
==   | ==键值==  | ||
{{KV:zh-cn|Solidity|intn=Solidity|choices|用于控制这个笔刷的坚固性/碰撞。  | |||
:*0: Toggle(切换)- 碰撞随其可见性一起切换。  | |||
:*1: Never Solid(从不碰撞)  | |||
:*2: Always Solid(始终碰撞)}}  | |||
{{KV:zh-cn|Solid BSP|intn=solidbsp|bool|如果玩家似乎相对于固体表面奇怪地旋转,则将此设置为 BSP。  | |||
:*0: [[VPhysics]]  | |||
:*1: BSP ([[QPhysics]])}}  | |||
{{KV:zh-cn|NPC class excluded from collisions|intn=excludednpc|classname|如果在此处指定了 NPC 类型名称(classname)(例如{{ent|npc_zombie}}),则该类型的 NPC 不会与这些笔刷发生碰撞。}}  | |||
{{KV:zh-cn|Invert NPC class exclusion|intn=invert_exclusion|bool|如果启用,则会将上述“NPC class excluded from collisions”属性的含义变成“仅该类型的 NPC 会与这些笔刷发生碰撞”}}  | |||
{{KV EnableDisable:zh-cn}}  | |||
:{{tip|如果 '''Solidity''' 是 ''Toggle'',禁用也会使实体没有碰撞。}}  | |||
{{KV visiblebrush:zh-cn|l4d=1}}  | |||
{{KV BaseEntity:zh-cn|brush=1}}  | |||
==   | ==标志==  | ||
*2: Ignore player +USE——实体将忽略所有{{ent|Use}}输入,包括来自玩家的输入(译者注:+USE即你按E键的作用)。  | |||
{{  | |||
==   | ==输入==  | ||
{{IO|  | {{IO:zh-cn|SetExcluded|更改不与画笔碰撞的NPC类。}}  | ||
{{IO|  | {{IO:zh-cn|SetInvert|是否反转NPC类排除规则。}}  | ||
{{IO|  | {{IO:zh-cn|Toggle|切换实体的启用状态|nofgd=1}}  | ||
{{  | {{I EnableDisable:zh-cn}}  | ||
{{  | {{I visiblebrush:zh-cn|portal2=1}}  | ||
{{I BaseEntity:zh-cn}}  | |||
{{  | |||
==   | ==输出==  | ||
{{O BaseEntity:zh-cn|l4d=1}}  | |||
Revision as of 15:34, 13 August 2024
本页面的译者及时间为大康 (talk) 08:08, 6 January 2022 (PST)。部分内容由机器翻译。
Template:Brush ent:zh-cn它是具有各种功能的通用笔刷实体。 它结合了来自 Goldsource 的func_wall、func_illusionary和func_wall_toggle的功能。上述实体现在仍然可以使用,但对内存的节省非常有限。
Todo: This template is currently using deprecated 
suf or {{Lang}}-based translations. Please use the main {{Code class}} instead, which uses {{Autolang}}.
 在源代码中,它由 class CFuncBrush 代表,定义于 modelentities.cpp。
键值
- Solidity 
(Solidity)<choices> - 用于控制这个笔刷的坚固性/碰撞。
- 0: Toggle(切换)- 碰撞随其可见性一起切换。
 - 1: Never Solid(从不碰撞)
 - 2: Always Solid(始终碰撞)
 
 
- NPC class excluded from collisions 
(excludednpc)<classname> - 如果在此处指定了 NPC 类型名称(classname)(例如npc_zombie),则该类型的 NPC 不会与这些笔刷发生碰撞。
 
- Invert NPC class exclusion 
(invert_exclusion)<boolean> - 如果启用,则会将上述“NPC class excluded from collisions”属性的含义变成“仅该类型的 NPC 会与这些笔刷发生碰撞”
 
EnableDisable/启动禁用:
- Start Disabled 
(StartDisabled)<boolean> - 保持休眠状态,直到被唤醒。(利用
Enable输入)。 
Tip:如果 Solidity 是 Toggle,禁用也会使实体没有碰撞。
Visible Brush:
- Minimum Light (_minlight) <float>
 - 击中此画笔的最小光量。 0 表示无,1 表示正常,2 表示加倍。
 
- Damage Filter Name (damagefilter) <targetname>
 - 当这个实体受到伤害时,它会被这个实体过滤。
 
- Render Mode (rendermode) <choices>
 - 在该实体上设置非标准渲染模式。
 
- 0: Normal
 - 1: Color
 - 2: Texture
 - 3: Glow
 - 4: Solid/Alphatest
 - 5: Additive
 - 6: Removed, does nothing
 - 7: Additive Fractional Frame
 - 8: Alpha Add
 - 9: World Space Glow
 - 10: Don't Render
 
- Render FX (renderfx) <choices>
 - 外观效果的预设模式。
 
- 0: None
 - 1: Slow Pulse
 - 2: Fast Pulse
 - 3: Slow Wide Pulse
 - 4: Fast Wide Pulse
 - 5: Slow Fade Away
 - 6: Fast Fade Away
 - 7: Slow Become Solid
 - 8: Fast Become Solid
 - 9: Slow Strobe
 - 10: Fast Strobe
 - 11: Faster Strobe
 - 12: Slow Flicker
 - 13: Fast Flicker
 - 14: Constant Glow
 - 15: Distort
 - 16: Hologram (Distort + fade)
 - 17: Scale Up
 - 22: Spotlight FX
 - 23: Cull By Distance
 - 24: Fade Wider Pulse
 - 26: Fade Near
 
Todo: 18-21, 25
- Render FX / Transparency (0 - 255) (renderamt) <integer>
 - 透明度量,需要正常(Normal)以外的渲染模式。 0 是不可见的,255 是完全可见的。
 
- Render Color (R G B) (rendercolor) <color255>
 - 色调。
 
- Shadow Cast Distance (shadowcastdist) <integer> !FGD
 - 设置实体投射动态阴影的距离。 0 表示与shadow_control实体相同的默认距离。
 
- Disable Receiving Shadows (disablereceiveshadows) <boolean>
 - 防止实体接收自身的阴影。
 
- Texture Frame (texframeindex) <integer> !FGD
 - 此实体上任何动画纹理的帧数。
 - Minimum CPU Level (mincpulevel)  <choices> (in all games since 
) - CPU 级别低于此值的用户将无法在游戏中看到此对象。目前还不清楚 CPU 级别是如何决定的,但大多数系统都被归类为“高”。
 
- Maximum CPU Level (maxcpulevel)  <choices> (in all games since 
) - 
- 0: Default(默认)
 - 1: Low(低)
 - 2: Medium(中)
 - 3: High(高)
 
 
- Minimum GPU Level (mingpulevel)  <choices> (in all games since 
) 
- Maximum GPU Level (maxgpulevel)  <choices> (in all games since 
) - 
- 0: Default
 - 1: Very low(非常低)
 - 2: Low
 - 3: Medium
 - 4: High
 
 
标志
- 2: Ignore player +USE——实体将忽略所有Use输入,包括来自玩家的输入(译者注:+USE即你按E键的作用)。
 
输入
- SetExcluded
 - 更改不与画笔碰撞的NPC类。
 
- SetInvert
 - 是否反转NPC类排除规则。
 
- Toggle !FGD
 - 切换实体的启用状态
 
EnableDisable/启动禁用:
- Enable
 
- Disable
 - 启动/禁用此实体所具备的效果。同样会使实体消失。
 
Visible Brush:
- AlternativeSorting <boolean>
 - 交换实体的渲染顺序。用于尝试修复渲染时的排序问题,例如在半透明材质前渲染对象。
 
- Color <color255>
 - 为实体设置 RGB 颜色。
 
- SetDamageFilter <targetname>
 - 为该实体设置一个过滤器以在它受到伤害时使用。
 
- EnableDamageForces
 - 允许实体被对其造成的伤害推动(通常力度与造成的伤害相关)。
 
- DisableDamageForces
 - 防止实体被对其造成的伤害推动。
 
- EnableShadow
 - 允许实体绘制渲染目标阴影。
 
- DisableDraw   (in all games since 
) - 将EF_NODRAW应用于实体。请注意,这与rendermode 10不同。
 
- EnableReceivingFlashlight   (in all games since 
) - 使实体被env_projectedtexture照亮。
 
- DisableReceivingFlashlight   (in all games since 
) - 防止实体被env_projectedtexture照亮。纹理产生的阴影仍然会投射。
 
- EnableDrawInFastReflection   (in all games since 
) - 使用
$reflectonlymarkedentities在水材质的反射中渲染实体。 
- DisableDrawInFastReflection   (in all games since 
) - 防止实体在快速反射中渲染。
 
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 - 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
 
输出
Base/基础:
- OnUser1 to OnUser4
 - 这些输出将分别响应于 
FireUser1到FireUser4输入。 详见 User Inputs and Outputs。 - OnKilled   (only in 

) - 当实体被Kill输入时响应此输出。