constraint.HasConstraints

From GMod Wiki

Revision as of 16:45, 23 March 2011 by Donkie (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax constraint.HasConstraints( Entity ent )
Where is this used?
Description:
Returns true if the entity has constraints, false if not.
Returns: Boolean
Part of Library: constraint
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Constraint.HasConstraints]Constraint.HasConstraints [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionWhenever the entity hits a entity without constraints, it will remove the entity. (To be used in entity code)
Used onNewerServer.png
Code
function ENT:StartTouch( ent )
	if constraint.HasConstraints( ent ) then return end
 
	ent:Remove()
end
OutputPoof!
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox