Rope Endpoint (Data Type)

Describes one end of a rope (how it is chosen at runtime) used by the from and to fields of the Attach Rope.

Describes one end of a rope (how it is chosen at runtime) used by the from and to fields of the apoli:attach_rope. An endpoint resolves to either an entity (the rope follows it) or a fixed world point (immovable, so the other end can’t get farther than the rope’s length - a tether/leash).

Fields

FieldTypeDefaultDescription
sourceString"self"Where the endpoint comes from. One of: self (the acting entity), target (the bi-entity target — only resolves when the action runs in a bi-entity context), raycast (cast a ray from the actor’s eyes), position (a fixed point).
distanceFloat30.0For raycast: how far the ray reaches.
entitiesBooleanfalseFor raycast: whether the ray can attach to an entity it hits.
blocksBooleantrueFor raycast: whether the ray can attach to a block it hits. When both entities and blocks are enabled the nearest hit wins.
positionArray of 3 FloatoptionalFor position: the fixed [x, y, z] world point.

Examples

{
   "source":"self"
}

The acting entity.

{
   "source":"raycast",
   "entities":true,
   "blocks":false,
   "distance":20
}

Whatever entity the actor is looking at within 20 blocks.

{
   "source":"position",
   "position":[
      100.5,
      64,
      200.5
   ]
}

A fixed anchor in the world.