Garry's Mod Wiki

Revision Difference

constraint.Motor#518270

<function name="Motor" parent="constraint" type="libraryfunc"> <description>Creates a motor constraint.</description> <realm>Server</realm> <file line="966">lua/includes/modules/constraint.lua</file> <args> <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="friction" type="number"></arg> <arg name="torque" type="number"></arg> <arg name="forcetime" type="number"></arg> <arg name="nocollide" type="number">Whether the entities should be no-collided.</arg> <arg name="toggle" type="number">Whether the constraint is on toggle.</arg> <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="pl" type="Player">The player that will be used to call <page>numpad.OnDown</page> and <page>numpad.OnUp</page>.</arg> <arg name="forcelimit" type="number">Amount of force until it breaks (0 = unbreakable)</arg> <arg name="numpadkey_fwd" type="number">The key binding for &quot;forward&quot;, corresponding to an &lt;page&gt;KEY&lt;/page&gt;</arg>⤶ <arg name="numpadkey_bwd" type="number">The key binding for &quot;backwards&quot;, corresponding to an &lt;page&gt;KEY&lt;/page&gt;</arg>⤶ <arg name="numpadkey_fwd" type="number">The key binding for "forward", corresponding to an <page>KEY</page></arg>⤶ <arg name="numpadkey_bwd" type="number">The key binding for "backwards", corresponding to an <page>KEY</page></arg>⤶ <arg name="direction" type="number"></arg> <arg name="LocalAxis" type="Vector"></arg> </args> <rets> <ret name="" type="Entity">Constraint. Will return false if the constraint could not be created.</ret> <ret name="" type="Entity">axis. Will return nil if the constraint could not be created.</ret> </rets> </function>