constraint.RemoveAll

From GMod Wiki

Revision as of 05:09, 30 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax constraint.RemoveAll( Entity ent )
Where is this used?
Description:
Removes all constraints from entity.
Returns: nil
Part of Library: constraint
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Constraint.RemoveAll]Constraint.RemoveAll [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionRemoves all the constraints from an entity and places it somewhere else.
Used onNewerServer.png
Code
 
 constraint.RemoveAll(ent)
 ent:SetPos(Vector(0, 0, 0))
 constraint.Weld(ent,ent2,tr.PhysicsBone,0,true)
 
OutputEntity moved to center of map and welded there.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox