Garry's Mod Wiki

Garry's Mod Wiki

  Entity, Entity constraint.Slider( Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos1, Vector localPos2, number width, string material = "", table color = color_white )

Description

Creates a slider constraint. A slider is like a rope, but allows the constrained object to move only in 1 direction.

Arguments

1 Entity ent1
First entity.
2 Entity ent2
Second entity.
3 number bone1
PhysObj number of first entity to constrain to. (0 for non-ragdolls).

See Entity:TranslateBoneToPhysBone.

4 number bone2
PhysObj number of second entity to constrain to. (0 for non-ragdolls).

See Entity:TranslateBoneToPhysBone.

5 Vector localPos1
Position relative to the the first physics object to constrain to.
6 Vector localPos2
Position relative to the the second physics object to constrain to.
7 number width
The width of the rope.
8 string material = ""
The material of the rope. If unset, will be solid black.
9 table color = color_white
The color of the rope. See Color.

Returns

1 Entity
The created constraint entity. (phys_slideconstraint) Will return false if the constraint could not be created.
2 Entity
The created rope. (keyframe_rope) Will return nil if the constraint or the rope could not be created.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...