CRopeKeyframe
Code classes:
CRopeKeyframe
CBaseEntity
(all ents)
CRopeKeyframe
is a code class in every Source game. It defines one end of a rope.
Classnames:
keyframe_rope
move_rope
Note: The properties set in a rope entity will only affect the rope drawn between that entity and the one specified in that entity's Next KeyFrame field.
Bug: In many games, parenting one of these to another entity causes it to disappear for no apparent reason. Tracker
- Fix: Using the SetParent input may fix this.
FGD Code[edit | edit source]
For whatever reason, keyframe_rope
and move_rope
have slightly different FGD info, which causes them to behave a little differently in Hammer. This forces mappers to start their ropes using move_rope
then create every other segment with keyframe_rope
, unless they're willing to tolerate some minor drawbacks.
Using only keyframe_rope
causes the first segment visualization to not appear (this can be avoided by creating one extra rope point), and using only move_rope
is tedious because the user has to change two keyvalues for every rope point by hand as opposed to using ⇧ Shift+Drag.
Regardless of which route the mapper goes, the rope will work the same ingame. The FGD code below gets rid of the differences, which will allow you to use whichever one you want. (This has already been done for you if you're using the full SE FGDs.)
@KeyFrameClass base(Targetname, Parentname, KeyFrame, RopeKeyFrame) studio("models/editor/axis_helper_thick.mdl") animator() keyframe() = keyframe_rope :
"It defines an endpoint of a rope. To create a rope between this entity and another, specify the name of one in the Next Keyframe field of the other. Use Shift+Drag to create ropes quickly. Identical to move_rope."
[
PositionInterpolator(choices)readonly : "Position Interpolator" : 2 : "Curve Type. Only type 2 (Rope) is fully supported." =
[
2 : "Rope"
]
]
@MoveClass base(Targetname, Parentname, KeyFrame, RopeKeyFrame) studio("models/editor/axis_helper_thick.mdl") animator() keyframe() = move_rope :
"It defines an endpoint of a rope. To create a rope between this entity and another, specify the name of one in the Next Keyframe field of the other. Use Shift+Drag to create ropes quickly. Identical to keyframe_rope."
[
PositionInterpolator(choices)readonly : "Position Interpolator" : 2 : "Curve Type. Only type 2 (Rope) is fully supported." =
[
2 : "Rope"
]
]
ConVars/Commands[edit | edit source]
ConVar/Command | Parameters or default value | Parameter Type | Effect |
---|---|---|---|
rope_shake | 0 | 0 disables, 1 enables | Makes ropes shake continuously. |
rope_wind_dist | 1000 | World units | Tells engine to not apply small wind gusts to ropes past this distance, for performance purposes. |
Flags[edit | edit source]
- 1: Auto resize - Whenever one end of the rope moves, the rope length will be adjusted to the length between the two endpoints, plus Slack.
Keyvalues[edit | edit source]
- Next KeyFrame
(NextKey)
<target_destination>
- A
keyframe_rope
ormove_rope
that this one should connect to. Only one is allowed. Note: Two rope entities do not need to specify each other; only one does. (Doing so actually creates two ropes.) - Type
(Type)
<choices>
- How many physical points the rope can bend at. This number is usually lower than the amount of visual segments. To do: Does Semi-rigid save any significant amount of perf compared to Rope?
- 0: Rope (8. Normal.)
- 1: Semi-rigid (2. Doesn't look quite as natural.)
- 2: Rigid (0. Does not bend at all.)
- Barbed
(Barbed)
<boolean>
- Experimental effect. Tries to make the rope look more like an actual rope by twisting the geometry. Looks awful if the rope has too much slack.
- Width (1-64)
(Width)
<float>
- Thickness of the rope in world units.
- Texture Scale
(TextureScale)
<float>
- Texture resolution. The default resolution is 4 texels per world unit. Larger values stretch the texture and smaller values scrunch it up.
- Collide with world
(Collide)
<boolean>
- Makes the rope solid to
worldspawn
. - Start Dangling
(Dangling)
<boolean>
- Tells the rope to have one end dangle freely in the air. Do not use this when hanging things on ropes!
- Breakable
(Breakable)
<boolean>
- Tells the rope to break when shot at one of its endpoints. To do: It seems like they aren't configured to take damage?
- Rope Material
(RopeMaterial)
<material>
- Texture to use on the rope.
- Disable Wind
(NoWind)
<boolean>
- Tells the rope to not be shaken by wind.
- Position Interpolator
(PositionInterpolator)
<choices>
- How the rope curve is done. Only type 2 (Rope) is fully supported.
- 0: Linear
- 1: Catmull-Rom Spline
- 2: Rope
Subdivision(Subdiv)
<integer>
- Does not work. Meant to set how many visual segments there are in the rope. The only factor actually involved in this appears to be its length.
Speed (units per second)(MoveSpeed)
<integer>
- Does not actually exist. Needs to be above 0 to show the rope preview in Hammer.
Minimum DX Level(mindxlevel)
to Maximum DX Level(maxdxlevel)
<choices>
(only available in games before Left 4 Dead)- Very outdated settings. Their functionality seems to no longer be fully intact. Nearly all players will be at the highest setting anyway because DirectX 8 has been obsolete since 2002. This is still in the FGD for Alien Swarm, but it doesn't use it.
- Minimum CPU Level
(mincpulevel)
to Maximum CPU Level(maxcpulevel)
<choices>
(available in all games since)
- A user with the "effect detail" setting not in this specific range will not see this object.
- 0: Default
- 1: Low
- 2: Medium
- 3: High
- Minimum GPU Level
(mingpulevel)
to Maximum GPU Level(maxgpulevel)
<choices>
(available in all games since)
- A user with the "shader detail" setting not in this specific range will not see this object. Settings are named differently in different games.
- 0: Default
- 1: Very low or Low
- 2: Low or Medium
- 3: Medium or High
- 4: High or Very High
Inputs[edit | edit source]
SetScrollSpeed<float>
- Sets an unused, broken keyvalue.
- SetForce
<vector>
- Instantly applies force to the rope. Format is three positive and/or negative numbers representing movement on the X, Y and Z axes.
- Break
- Tells the rope to break (ignoring Breakable).