Garry's Mod Wiki

Revision Difference

constraint.Winch#514421

<function name="Winch" parent="constraint" type="libraryfunc">⤶ <description>Creates a Winch constraint.</description>⤶ <realm>Server</realm>⤶ <file line="1253">lua/includes/modules/constraint.lua</file>⤶ <args>⤶ <arg name="pl" type="Player">The player that will be used to call &lt;page&gt;numpad.OnDown&lt;/page&gt; and &lt;page&gt;numpad.OnUp&lt;/page&gt;.</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="width" type="number">The width of the rope.</arg>⤶ <arg name="fwd_bind" type="number">The key binding for &quot;forward&quot;, corresponding to an &lt;page&gt;KEY&lt;/page&gt;</arg>⤶ <arg name="bwd_bind" type="number">The key binding for &quot;backwards&quot;, corresponding to an &lt;page&gt;KEY&lt;/page&gt;</arg>⤶ <arg name="fwd_speed" type="number">Forward speed.</arg>⤶ <arg name="bwd_speed" type="number">Backwards speed.</arg>⤶ <arg name="material" type="string">The material of the rope.</arg>⤶ <arg name="toggle" type="boolean">Whether the winch should be on toggle.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="Entity">Constraint. Can return nil. 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.</ret>⤶ </rets>⤶ </function>⤶ ⤶