这篇条目有关 Source引擎。如需详情,点击这里。

func_water_analog

From Valve Developer Community
Jump to: navigation, search

func_water_analog是一个固实体存在于所有的 起源 起源 游戏。它是func_movelinear的一个版本,专门用作水。

已知只有两种材质可以在所有系统中正确渲染,它们是nature/water_movingplanenature/water_dx70昂贵的水着色器必须保持不动,因为它们必须始终确定可以/应该在表面反射中绘制什么。廉价的水不反射世界,因此永远不会遇到能见度问题。

Icon-Bug.png错误:求生之路2 中表现不正常!如果受到此笔刷的影响,物理将无法正常运行,并且可能会出现图形故障。谨慎使用!
Note.png注意:SetPosition输入和 Start Position(起始位置)键值不执行任何边界检查,因此可以使用小于 0 和大于 1 的值。负值将沿与移动方向相反的方向移动,大于 1 的值将以设置的 Move Distance(移动距离)的倍数移动。越过打开/关闭后的位置不会触发OnFullyOpenOnFullyClosed输出。
Icon-Bug.png错误:将此实体作为以下任何一项的父项时可能会出现错误:func_movelinearmomentary_doorfunc_lookdoorfunc_water_analogfunc_door可以用作解决方法。
代码修复: 有关代码修复,请参见此处
证实:也许在传送门 2 中修复了?父级移动线性广泛用于该游戏的活塞平台。
Icon-Bug.png错误:军团要塞2 中,作为move_ropekeyframe_rope的父级将导致实体消失。如果绳索实体被删除或根本没有被渲染,则需要清除。


在源代码中,它由 class CFuncMoveLinear 代表,定义于 func_movelinear.cpp

标志

不存在于FGD!

FuncMoveLinear:

  • 8: 非固体
Warning icon.png
This article has been marked as a candidate for speedy deletion because it has been deprecated.
If you object to this decision, then please discuss why hereIf 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 - Remember to check if anything links here and the page history (last edit) before deleting.

键值

FuncMoveLinear:

Move Direction (Pitch Yaw Roll) (movedir) <angle>
实体将移动的方向。
Start Position (startposition) <float> | 浮点型
笔刷生成时的位置,其中 0 是起始位置,1 是 starting position(起始位置) + [move direction (移动方向) * move distance (移动距离)]
Speed (speed) <integer> | 整数
笔刷移动的速度,单位是英寸/秒。
Move Distance (movedistance) <float> | 浮点型
笔刷应该从起点移动的距离,以英寸为单位。
Block Damage (blockdamage) <float> | 浮点型
每帧对阻挡笔刷(移动)的任何实体造成的伤害量。
Warning icon.png
This article has been marked as a candidate for speedy deletion because it has been deprecated.
If you object to this decision, then please discuss why hereIf 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 - Remember to check if anything links here and the page history (last edit) before deleting.
Sound played when the brush starts moving. (startsound) <sound>
笔刷开始移动时播放的声音。
Sound played when the brush stops moving. (stopsound) <sound>
笔刷停止移动时播放的声音。

Visible Brush:

Minimum Light (_minlight) <float> | 浮点型
击中此画笔的最小光量。 0 表示无,1 表示正常,2 表示加倍。
Damage Filter Name (damagefilter) <targetname> | 目标名
当这个实体受到伤害时,它会被这个实体过滤
Render Mode (rendermode) <choices>
在该实体上设置非标准渲染模式。



Render FX (renderfx) <choices>
外观效果的预设模式。


Warning icon.png
This article has been marked as a candidate for speedy deletion because it has been deprecated.
If you object to this decision, then please discuss why hereIf 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 - Remember to check if anything links here and the page history (last edit) before deleting.
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实体相同的默认距离。
Shadows (vrad_brush_cast_shadows) <integer> | 整数 不存在于FGD!
确定该实体是否会投射光照贴图阴影。
  • 0: No shadows
  • 1: Cast shadows
Disable Shadows (disableshadows) <boolean> | 布尔值
防止实体创建廉价的渲染到纹理阴影。不影响阴影贴图
Disable Receiving Shadows (disablereceiveshadows) <boolean> | 布尔值
防止实体接收自身的阴影。
Texture Frame (texframeindex) <integer> | 整数 不存在于FGD!
此实体上任何动画纹理的帧数。

Base/基础:
Collisions (solid) <choices>
该实体的碰撞方式。


Name (targetname) <string简体中文> | 字符串
其他实体用来指代该实体的名称。
Parent简体中文 (parentname) <targetname> | 目标名
实体的父级实体,该实体可以与父实体保持移动偏移。名称后面可以添加一个附属点,以逗号隔开。 (parentname [targetname],[attachment]
Tip.png提示:转换至下一张地图的实体关系会依然存在。
Tip.png提示:一些不适合做父实体的实体可能难以运行,利用phys_constraint可以解决。
Origin (X Y Z) (origin) <coordinates>
实体处于世界中的位置,旋转实体会以实体坐标原点旋转。
Note.png注意:Hammer 不会仅在编辑器中相应地移动实体。
Pitch Yaw Roll (X Y Z) (angles) <angle>
实体在世界中的方位,Pitch围绕X轴旋转,可以称为俯仰角。Yaw围绕Z轴旋转,可以称为偏航角,roll围绕Y轴旋转。
Note.png注意:尽管 Hammer 不显示新角度,但其仍然适用于固实体。
Classname (classname) <string简体中文> | 字符串 不存在于FGD!
确定实体之前它生成的特征。
Tip.png提示:使用AddOutput输入更改 Classname 仍然会影响游戏的代码,例如使类名与 S_PreserveEnts 列表中的一个元素匹配将使实体在新一轮中持续存在!
Flags (spawnflags) <integer> | 整数 不存在于FGD!
实体所具有的标志/标签,依实体所具有而定。
Effects (effects) <integer> | 整数 不存在于FGD!
要使用的效果标志的组合。
Entity Scripts简体中文 (vscripts) <scriptlist> | 脚本列表 (存在于自 求生之路2 以来)
在所有实体生成后执行的 VScript简体中文 文件(无文件扩展名)的空格分隔列表。这些脚本都在同一个脚本范围内执行,以后的脚本会覆盖任何相同的变量和函数。
Thinker Function简体中文 (thinkfunction) <string简体中文> | 字符串 (存在于自 求生之路2 以来)
此实体脚本中的函数名称,该函数将在脚本持续时间内每 100 毫秒(每秒 10 次)自动调用一次。它可用于创建计时器或模拟自主行为。返回值(如果存在)将设置下一次调用之前的时间。尽量避免在此函数中进行昂贵的操作,因为它可能会导致性能问题。
Lag Compensation (LagCompensate) <boolean> | 布尔值 (存在于自 求生之路2 以来) 不存在于FGD!
设置为以延迟补偿此实体。应该非常谨慎地使用!
Is Automatic-Aim Target (is_autoaim_target) <boolean> | 布尔值 (in all games since 反恐精英:全球攻势) 不存在于FGD!
如果设置为 1,当实体位于十字准线下方时,该实体将减慢控制台和操纵杆控制器的瞄准移动速度。


输入

FuncMoveLinear:

Open
将笔刷移动到结束位置 {starting position (起始位置) + [move direction (移动方向) * move distance (移动距离)]}。
Close
将笔刷移动到起始位置。
SetPosition<float> | 浮点型
移动笔刷到指定的位置,其中 0 是起始位置,1 是 starting position(起始位置) + [move direction (移动方向) * move distance (移动距离)]
SetSpeed<float> | 浮点型
设置速度并立即更新。

Visible Brush:

Alpha<integer> | 整数
将实体的透明度设置为从 0(不可见)到 255(完全可见)的数字。要求实体将其渲染模式 (rendermode) 设置为0以外的数字。
AlternativeSorting<boolean> | 布尔值
交换实体的渲染顺序。用于尝试修复渲染时的排序问题,例如在半透明材质前渲染对象。
Color<color255简体中文>
为实体设置 RGB 颜色。
SetDamageFilter<targetname> | 目标名
为该实体设置一个过滤器以在它受到伤害时使用。
EnableDamageForces
允许实体被对其造成的伤害推动(通常力度与造成的伤害相关)。
DisableDamageForces
防止实体被对其造成的伤害推动。
EnableShadow
允许实体绘制渲染目标阴影。
DisableShadow
防止实体绘制渲染目标阴影。
EnableDraw (in all games since 传送门2)
从实体中移除EF_NODRAW
DisableDraw (in all games since 传送门2)
EF_NODRAW应用于实体。请注意,这与rendermode 10不同。
EnableReceivingFlashlight (in all games since 传送门2)
使实体被env_projectedtexture照亮。
DisableReceivingFlashlight (in all games since 传送门2)
防止实体被env_projectedtexture照亮。纹理产生的阴影仍然会投射。
EnableDrawInFastReflection (in all games since 传送门2)
使用$reflectonlymarkedentities在水材质的反射中渲染实体。
DisableDrawInFastReflection (in all games since 传送门2)
防止实体在快速反射中渲染。

Base:
AddContext<string简体中文> | 字符串
添加到实体的 Response Contexts/响应上下文列表。格式是<key>:<value>
AddOutput<string简体中文> | 字符串
在此实体上分配新的键值/输出。对于键值,有些依赖于额外的必要代码来运行,如果它只是通过这个输入改变就行不通。必须遵循严格的格式:
语法:

ClearContext
从此实体的列表中删除所有上下文。
ClearParent
从移动层次结构中删除该实体,使其可以自由移动。
FireUser1FireUser4
触发相应的OnUser输出;详见 User Inputs and OutputsEnglish
Kill
从这个世界中删除此实体。
KillHierarchy
功能类似Kill,尽管此实体与其父实体都被删除了,但比Kill快一点。
RemoveContext
从实体列表删除一个上下文。名字应与现有上下文进行匹配。
SetParent<string简体中文> | 字符串
跟随此实体移动,详见 实体层级(依赖关系)
SetParentAttachment<string简体中文> | 字符串
更改此实体到其父级上的特定附属English点。实体将传送,以至于其骨骼方位English与附属匹配。在使用此输入前必须设置好实体的父实体。
SetParentAttachmentMaintainOffset<string简体中文> | 字符串
同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
Use 不存在于FGD!
与调用 +use English 的玩家相同[玩家按 +use(使用,默认E按钮)];大多数情况下没有影响。
DispatchResponse<string简体中文> | 字符串 不存在于FGD!
向实体发送一个上下文。 详见 ResponseEnglishConceptEnglish.
DispatchEffect<string简体中文> | 字符串 (自从 求生之路移除) 不存在于FGD!
在实体的原点坐标设置一个特定效果;参见 List of Client EffectsEnglish。自从求生之路 求生之路后由粒子系统取代。
RunScriptFile<script> | 脚本 (存在于自 求生之路2 以来)
从硬盘执行一个 VScript 脚本文件,不带文件后缀名。会合并接收实体的脚本域。
RunScriptCode<string简体中文> | 字符串 (存在于自 求生之路2 以来)
在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。
Icon-Bug.png错误:在 Hammer 中,使用带有字符串的参数会破坏 VMFEnglish 文件的结构,使下一个 Hammer 会话无法查看该文件。
修复: 使用文本编辑器手动删除带有字符串的参数。
CallScriptFunction<string简体中文> | 字符串 (存在于自 求生之路2 以来) 不存在于FGD!
在接受实体脚本域上执行一段 VScript 函数。
SetLocalOrigin<coordinates> (存在于自 异形丛生 以来) 不存在于FGD!
将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
SetLocalAngles<angles> (存在于自 异形丛生 以来) 不存在于FGD!
设置该实体的角度。

输出

FuncMoveLinear:

OnFullyOpen
当笔刷移动到结束位置时触发 {starting position (起始位置) + [move direction (移动方向) * move distance (移动距离)]}。
OnFullyClosed
当笔刷移动达起始位置时触发。

Base/基础:

OnUser1OnUser4
这些输出将分别响应于 FireUser1FireUser4 输入。 详见 User Inputs and Outputs
OnKilled (only in Left 4 Dead series)
当实体被Kill输入时响应此输出。

另请参阅