constraint.Hydraulic
Entity, Entity, Entity, Entity constraint.Hydraulic( Player player, Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos1, Vector localPos2, number length1, number length2, number width, number key, number slider, number speed, string material = "", boolean toggle = true, table color = color_white )
Description
Creates a controllable constraint.Elastic, aka a Hydraulic constraint.
Arguments
5 number bone2
PhysObj number of second entity to constrain to. (0 for non-ragdolls). Must be different from
bone1
.
15 boolean toggle = true
Whether the hydraulic should be a toggle, not a "hold key to extend" action.
Returns
1 Entity
The created constraint. (phys_spring) Will return
false
if the constraint could not be created.3 Entity
The muscle controller. (
gmod_winch_controller
) Will return nil
if the constraint could not be created.4 Entity
The slider (phys_slideconstraint) if
fixed
was exactly 1
. Will return nil otherwise, or if the constraint could not be created.