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

move_rope / keyframe_rope

From Valve Developer Community
< Zh(Redirected from Zh/Move rope)
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
Recycle-warning.png
This is a preserved entity in 反恐精英:起源半衰期2:死亡竞赛军团要塞2传送门2反恐精英:全球攻势
If the game has round restart mechanics this entity may not behave as expected.

move_ropekeyframe_rope是一个点实体(en),可在所有的 起源 起源 游戏中使用。

类层级
CRopeKeyframe
CBaseEntity
rope.cpp

该实体用于标记电缆与绳索(en)中的节点。在编辑器中可能显示为keyframe_ropemove_rope,但两者在代码中完全一致。

传统上,绳索链的第一个实体使用move_rope,后续节点使用keyframe_rope。除非使用Hammer++ Hammer++TeamSpen's Hammer Addons TeamSpen's Hammer Addons或其他自定义FGD/Hammer版本修改此设定,否则这是Hammer显示绳索预览的必要条件。但游戏运行时并不关心具体使用哪种组合。

Tip.png提示:按住 Shift移动正确命名的keyframe_rope会自动创建连接的新节点。删除系列中的某个keyframe_rope时,其他实体会自动重新连接后续节点。
Note.png注意:军团要塞2 军团要塞2反恐精英:全球攻势 反恐精英:全球攻势中,冬季活动期间该实体会自动添加节日灯光效果(纯装饰性,不产生光照(en))。军团要塞2可通过tf_gamerules(en)禁用此效果。
待完善: 验证反恐精英:全球攻势是否也可禁用
Warning.png警告:在作为保留实体(en)的多人游戏中,该实体不能被父级化。tf2(en)中可通过VScript(en)修复:

// 此处保留原始VScript代码不做翻译
待完善: 测试2025更新后支持VScript的css(en)

键值

参见:  Generic Keyvalues, Inputs and Outputs available to all entities
Name(en) (targetname) <target_source>
其他实体引用该实体的目标名称。
Next KeyFrame (NextKey) <target_destination>
该绳索路径中下一个关键帧的名称。
Slack (Slack) <整数(en)>
绳索的额外长度(默认取编辑器内两端点间距)。
Type (Type) <choices>
绳索类型:
  • 0 : 柔性绳索
  • 1 : 半刚性
  • 2 : 刚性
Subdivision (Subdiv) <整数(en)>
绳索段间的细分数量(最大值8)。值越高越平滑,但渲染性能越低。
Barbed (Barbed) <布尔值(en)>
测试效果,使绳索呈现倒刺状外观。
Width (1-64) (Width) <浮点型(en)>
绳索宽度(可小于1的小数值)。
Texture Scale (TextureScale) <浮点型(en)>
纹理分辨率(默认4像素/英寸)。值越大纹理越拉伸,越小越紧缩。
Collide with world (Collide) <布尔值(en)>
是否与世界几何体碰撞(仅限世界几何体)。
Start Dangling (Dangling) <布尔值(en)>
是否初始状态下脱离目标端点。
Breakable (Breakable) <布尔值(en)>
是否可被射击破坏。
Note.png注意:若启用世界碰撞,当端点接触世界几何体时不会显示断裂效果(包括接触笔刷顶点/边或位于笔刷内部)。
Rope Material (RopeMaterial) <material(en)>
绳索渲染材质。
Note.png注意:起源引擎无法渲染使用cable/chain.vmt材质的绳索。
UseWind (UseWind) <布尔值(en)> (存在于自 l4d(en) 以来)
是否受env_wind(en)实体影响摇摆。
性能消耗极高,过度使用可能导致场景渲染异常并持续输出"Scene is too complex"错误。
如需摇摆效果,使用骨骼动画的绳索模型可能更高效。
Disable Wind (NoWind) <布尔值(en)> (存在于 DODS(en) 之中)
是否禁用风力影响。
Position Interpolator (PositionInterpolator) <choices>
插值类型(目前仅类型2完全支持):
  • 0 : 线性
  • 1 : Catmull-Rom样条
  • 2 : 绳索算法
Note.png注意:FGD中仅move_rope显示此参数,但两者实际均可使用。

属性

Auto Resize : [1]
允许实体移动时绳索"拉伸"。

输入

SetScrollSpeed <浮点型(en)>
设置纹理滚动速度。
SetForce <angle(en)>
对绳索施加瞬时力(参数为X Y Z向量)。
Break
若标记为可破坏,则立即断裂绳索。