constraint.Slider

From GMod Wiki

Revision as of 05:40, 2 March 2010 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax constraint.Slider( Entity Ent1, Entity Ent2, Number Bone1, Number Bone2, Vector LPos1, Vector LPos2, Number width )
Where is this used?
Description:
Creates a slider constraint.
Returns: Entity constraint, Entity rope
Part of Library: Constraint
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Constraint.Slider]Constraint.Slider [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionTaken from the Slider tool in toolgun.
Used onNewerServer.png
Code
 
// Get client's CVars
local width		= self:GetClientNumber( "width" ) or 1.5
 
// Get information we're about to use
local Ent1,  Ent2  = self:GetEnt(1),	 self:GetEnt(2)
local Bone1, Bone2 = self:GetBone(1),	 self:GetBone(2)
local LPos1, LPos2 = self:GetLocalPos(1),self:GetLocalPos(2)
 
local constraint,rope = constraint.Slider( Ent1, Ent2, Bone1, Bone2, LPos1, LPos2, width )
 
OutputN/A


Additional Notes

See Also

Stub.pngThis article is a stub.
You can help the GMod Wiki by expanding it.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox