Garry's Mod Wiki

Revision Difference

duplicator.RegisterConstraint#551869

<function name="RegisterConstraint" parent="duplicator" type="libraryfunc"> <description>Register a function used for creating a duplicated constraint.</description> <realm>Shared</realm> <file line="324-L334">lua/includes/modules/duplicator.lua</file> <file line="367-L374">lua/includes/modules/duplicator.lua</file> <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>