Garry's Mod Wiki

constraint.RemoveAll

boolean, number constraint.RemoveAll( Entity ent )

Description

Attempts to remove all constraints associated with an entity

Arguments

1 Entity ent
The entity to remove constraints from

Returns

1 boolean
Whether any constraints were removed
2 number
Number of constraints removed

Example

From stools/remover.lua

-- Reload removes all constraints on the targetted entity function TOOL:Reload( trace ) if ( !IsValid( trace.Entity ) or trace.Entity:IsPlayer() ) then return false end return constraint.RemoveAll( trace.Entity ) end

Page Links


Special Pages


Wikis

?

Render Time: 30ms

Session 0
DB GetPage 2
Generate Html 6
SaveChanges 8
Render Body 0
Render Sidebar 11