Garry's Mod Wiki

duplicator.CreateConstraintFromTable

  Entity, Entity, Entity, Entity duplicator.CreateConstraintFromTable( table constraint, table entityList )

Description

This is used internally - although you're able to use it you probably shouldn't.

Creates a constraint from a saved/copied constraint table.

Arguments

1 table constraint
Saved/copied constraint table
2 table entityList
The list of entities that are to be constrained

Returns

1 Entity
The newly created constraint entity, if any.

For example, an entity of class phys_pulleyconstraint or phys_spring, etc., the functional entity of the constraint.

2 Entity
The second constraint related entity, if any.

For a most constraints, this would be a keyframe_rope for the visual part of a constraint.

3 Entity
The third constraint related entity, if any.

For example, a Hydraulic constraint would return the gmod_winch_controller entity here. A pulley would have another keyframe_rope.

4 Entity
The fourth constraint related entity, if any.

For example, a Hydraulic constraint would return the phys_slideconstraint entity here. A pulley would have yet another keyframe_rope.