Garry's Mod Wiki

Garry's Mod Wiki

  boolean constraint.CanConstrain( Entity ent, number bone )

Description

Basic checks to make sure that the specified entity and bone are valid. Returns false if we should not be constraining the entity.

Arguments

1 Entity ent
The entity to check
2 number bone
The bone of the entity to check (use 0 for mono boned ents)

Returns

1 boolean
Whether a constraint can or should be created.

Example

From modules/constraint.lua

function Weld( Ent1, Ent2, Bone1, Bone2, forcelimit, nocollide, deleteonbreak ) if ( !CanConstrain( Ent1, Bone1 ) ) then return false end if ( !CanConstrain( Ent2, Bone2 ) ) then return false end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...