Revision Difference
duplicator.RegisterConstraint#515443
<function name="RegisterConstraint" parent="duplicator" type="libraryfunc">⤶
<description>Register a function used for creating a duplicated constraint.</description>⤶
<realm>Shared</realm>⤶
<args>⤶
<arg name="name" type="string">The unique name of new constraint</arg>⤶
<arg name="callback" type="function">Function to be called when this constraint is created</arg>⤶
<arg name="..." type="any">Arguments passed to the callback function</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>This is from lua/includes/modules/constraint.lua, it registers the Weld Constraint.</description>⤶
<code>duplicator.RegisterConstraint( "Weld", Weld, "Ent1", "Ent2", "Bone1", "Bone2", "forcelimit", "nocollide", "deleteonbreak" )</code>⤶
⤶
</example>