Attach Rope (Bi-Entity Action Type)

Attaches a rope between the actor and the target.

Attaches a rope between the actor and the target. This is the same action as apoli:attach_rope in the entity context, registered again here so an endpoint can use "source": "target".

Type ID: apoli:attach_rope

Fields

FieldTypeDefaultDescription
fromRope Endpoint{ "source": "self" }One end of the rope. self is the actor.
toRope Endpoint{ "source": "raycast", "blocks": true }The other end. Use { "source": "target" } for the entity this action was run against.
slotStringoptionalA label for this rope. Attaching again with the same slot replaces the previous rope in it.
textureIdentifierapoli:textures/rope/rope.pngThe texture the rope is drawn with.
toggleBooleantrueWhen true and no slot is given, re-firing while the actor already holds a controllable rope releases it instead of adding another.
controllableBooleantrueWhether the built-in reel/swing keys drive this rope for its owner. Set false for tethers you cast on other entities.
modeString"leash"leash, spring or rigid — see the entity action page.
break_beyondFloat0.0Snap the rope once its ends are farther apart than this many blocks. 0 never breaks.
min_lengthFloat1.0Shortest the rope can reel to.
max_lengthFloat30.0Longest the rope can be.
start_lengthFloatsee belowThe length the rope is created at, clamped to min_lengthmax_length. Left out, a controllable rope starts taut at the current distance between its ends, and a rope that is not controllable starts at max_length.
stiffnessFloat0.1How hard the rope yanks an end back once it passes its length.
radial_dampingFloat0.85How much outward speed is bled off at the length limit.
spring_scalingFloat0.65Extra softening while swinging inward.
swing_boostFloat1.08Speed multiplier applied to a sprinting player’s swing.
max_swing_speedFloat0.7Cap on the sprint swing boost.
control_accelFloat0.08How hard the WASD swing keys push a controllable rope.
reel_stepFloat0.2Blocks per tick the length changes while a reel key is held.
slack_pull_rateFloat5.0Multiplier applied to reeling in while there is slack.
constrain_fromBooleantrueWhether the physics may pull the from end.
constrain_toBooleantrueWhether the physics may pull the to end.

Example

{
  "type": "apoli:attach_rope",
  "to": { "source": "target" },
  "slot": "whip",
  "controllable": false,
  "max_length": 6,
  "break_beyond": 14
}

A whip that hooks whatever you hit and drags it along within 6 blocks until the two of you are pulled 14 blocks apart. Because it is not controllable, it starts at its full 6-block length.