Entity/GetNumPoseParameters

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Added code example)
m
Line 14: Line 14:
 
Note: Entity '35' is the model of a combine helicopter.
 
Note: Entity '35' is the model of a combine helicopter.
 
|Code=local ent = Entity(35)
 
|Code=local ent = Entity(35)
for i=0,self:GetNumPoseParameters() do
+
for i=0,ent:GetNumPoseParameters() do
print( self:GetPoseParameterName( i ) )
+
print( ent:GetPoseParameterName( i ) )
 
end
 
end
 
|Output=weapon_pitch
 
|Output=weapon_pitch

Revision as of 14:44, 18 April 2015

 Entity:GetNumPoseParameters( )

Contents

Description

Returns amount of pose parameters the entity has.

Returns

number

Amount of pose parameters the entity has

Examples

Example

Prints all the entities poses. Note: Entity '35' is the model of a combine helicopter.

local ent = Entity(35)
for i=0,ent:GetNumPoseParameters() do
	print( ent:GetPoseParameterName( i ) )
end

Output:

weapon_pitch

weapon_yaw

rudder
Personal tools
Navigation