ENT.BuildBonePositions

From GMod Wiki

Revision as of 16:49, 5 November 2010 by Grea$eMonkey (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameBuildBonePositions
SyntaxENT:BuildBonePositions( Integer NumBones, Integer NumPhysBones )
DescriptionAllows you to modify the bone vmatrix object of an entity.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=ENT.BuildBonePositions]ENT.BuildBonePositions [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

When using this on a custom SENT or SNPC, this is the form you should use:

DescriptionAn example of use on a SENT or SNPC.
Used onNewerClient.png
Code
function ENT:BuildBonePositions( NumBones, NumPhysBones )
 
end
OutputN/A


When using this on a player or some other entity, this is the form you should use:

DescriptionAn example on how to correctly define BuildBonePositions on a player.
Used onNewerClient.png
Code
function GM:OnEntityCreated( ent )
 
	if ent:IsPlayer() then -- We want to define this for each player that gets created.
 
		ent.BuildBonePositions = function( self, NumBones, NumPhysBones )
 
			-- Do stuff
 
		end
 
	end
 
end
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox