Skip to content

setRopeLength

Shared

Changes a rope's length, which is how attached cargo is raised or lowered.

Syntax

bool setRopeLength(rope theRope, float length)

Arguments

theRoperope

Managed rope element.

lengthfloat

New length. 0 or greater.

Returns

true when applied; false for an invalid rope or value.

Ownership and lifecycle

A rope belongs to the resource that created it. GTA has eight native rope slots, so Neon leases them to the logical ropes that need one; a rope without a lease still exists but is not natively simulated at that moment. Every native type except swat requires a valid physical holder.

Important behavior
  • Shortening the rope is how you lift. The showcase hoists a crate and a vehicle this way rather than moving them directly.
  • A wrecking ball left at a default length can initialise below terrain, so set it deliberately.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →