duplicator.RegisterConstraint

From Garry's Mod
Jump to: navigation, search
 duplicator.RegisterConstraint( )

Contents

Description

Register a function used for creating a duplicated constraint.

Arguments

string name

The unique name of new constraint

Arguments

function callback

Function to be called when this constraint is created

Arguments

any ...

Arguments passed to the callback function

Examples

Example

This is from lua/includes/modules/constraint.lua, it registers the Weld Constraint.

duplicator.RegisterConstraint( "Weld", Weld, "Ent1", "Ent2", "Bone1", "Bone2", "forcelimit", "nocollide", "deleteonbreak" )


Personal tools
Navigation