Garry's Mod Wiki

Entity:SetEntity

  Entity:SetEntity( string name, Entity entity )

Description

Allows you to set the Start or End entity attachment for the rope.

Arguments

1 string name
The name of the variable to modify. Accepted names are StartEntity and EndEntity.
2 Entity entity
The entity to apply to the specific attachment.

Example

As seen in the constraints module.

local rope = ents.Create( "keyframe_rope" ) -- Attachment point 1 rope:SetEntity( "StartEntity", Entity(1) ) -- Attachment point 2 rope:SetEntity( "EndEntity", Entity(2) )