Entity/GetBoneCount

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(CSEnt note)
(More specific note)
 
Line 2: Line 2:
 
|Description=Returns the amount of bones in the entity.
 
|Description=Returns the amount of bones in the entity.
  
{{Note|Will return -1 for {{GlobalFunction|ClientsideModel}} until {{ClassFunction|Entity|SetupBones}} is called on the entity.}}
+
{{Note|Will return -1 for {{GlobalFunction|ClientsideModel}} or undrawn entities until {{ClassFunction|Entity|SetupBones}} is called on the entity.}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes

Latest revision as of 15:38, 6 July 2019

 Entity:GetBoneCount( )

Contents

Description

Returns the amount of bones in the entity.

NOTE

Will return -1 for ClientsideModel or undrawn entities until Entity:SetupBones is called on the entity.

Returns

number

The amount of bones in given entity; -1 on failure.

Examples

Example

Prints amount of bones in player 1

print( Entity(1):GetBoneCount() )

Output:

The amount of bones in player 1, which normally would be 68.
Personal tools
Navigation