Garry's Mod Wiki

constraint.CreateKeyframeRope

  Entity constraint.CreateKeyframeRope( Vector pos, number width, string material = nil, Entity constraint = nil, Entity ent1, Vector localPos1, number bone1, Entity ent2, Vector localPos2, number bone2, table keyValues = nil )

Description

Creates a rope without any constraint.

Arguments

1 Vector pos
Position for the rope entity. Unknown effect, probably none.
2 number width
Width of the rope.
3 string material = nil
Material of the rope. If unset, will be solid black.
4 Entity constraint = nil
Constraint for the rope. If set, the rope will be deleted when the constraint entity is.
5 Entity ent1
First entity.
6 Vector localPos1
Position relative to the the first physics object to constrain to.
7 number bone1
PhysObj number of first entity to constrain to. (0 for non-ragdolls).

See Entity:TranslateBoneToPhysBone.

8 Entity ent2
Second entity.
9 Vector localPos2
Position relative to the the second physics object to constrain to.
10 number bone2
PhysObj number of second entity to constrain to. (0 for non-ragdolls).

See Entity:TranslateBoneToPhysBone.

11 table keyValues = nil
Any additional key/values to be set on the rope.

Returns

1 Entity
The created rope (keyframe_rope), or nil or failure.