Garry's Mod Wiki

Revision Difference

constraint.Hydraulic#544130

<function name="Hydraulic" parent="constraint" type="libraryfunc"> <description>Creates a Hydraulic constraint.</description> <realm>Server</realm> <file line="1324">lua/includes/modules/constraint.lua</file> <args> <arg name="pl" type="Player">The player that will be used to call <page>numpad.OnDown</page>.</arg> <arg name="Ent1" type="Entity">First entity.</arg> <arg name="Ent2" type="Entity">Second entity.</arg> <arg name="Bone1" type="number">Bone of first entity (0 for non-ragdolls),</arg> <arg name="Bone2" type="number">Bone of second entity (0 for non-ragdolls).</arg> <arg name="LPos1" type="Vector"></arg> <arg name="LPos2" type="Vector"></arg> <arg name="Length1" type="number"></arg> <arg name="Length2" type="number"></arg> <arg name="width" type="number">The width of the rope.</arg> <arg name="key" type="number">The key binding, corresponding to an <page>Enums/KEY</page></arg> <arg name="fixed" type="number">Whether the hydraulic is fixed.</arg> <arg name="speed" type="number"></arg> <arg name="material" type="string">The material of the rope.</arg> <arg name="color" type="table">The color of the rope. See <page>Global.Color</page>.</arg>⤶ </args> <rets> <ret name="" type="Entity">Constraint. Will return false if the constraint could not be created.</ret> <ret name="" type="Entity">rope. Will return nil if the constraint could not be created.</ret> <ret name="" type="Entity">controller. Can return nil depending on how the constraint was created. Will return nil if the constraint could not be created.</ret> <ret name="" type="Entity">slider. Can return nil depending on how the constraint was created. Will return nil if the constraint could not be created.</ret> </rets> </function>