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: 69ms

DB GetPage 40
Generate Html 6
SaveChanges (1) 10
Render Body 0
Render Sidebar 10