ENT.BuildBonePositions
From GMod Wiki
Revision as of 16:49, 5 November 2010 by Grea$eMonkey (Talk | contribs)
Event Hook | |
Hook Name | BuildBonePositions |
Syntax | ENT:BuildBonePositions( Integer NumBones, Integer NumPhysBones ) |
Description | Allows you to modify the bone vmatrix object of an entity. |
Returns | Nil |
Lua State | |
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:
Description | An example of use on a SENT or SNPC. |
---|---|
Used on | |
Code | function ENT:BuildBonePositions( NumBones, NumPhysBones ) end |
Output | N/A |
When using this on a player or some other entity, this is the form you should use:
Additional Notes
- BuildBonePositions is called automatically. It is the only place where you can use functions like Entity.SetBonePosition and Entity.SetBoneMatrix.
- It is NOT called as a metamethod, so defining it in a metatable will do nothing. Unless this is already defined in the entity's code, like a custom SENT for example, it needs to be defined as a plain method on a per-entity basis. See the above examples.
- Entities like C_BaseFlex (i.e. ClientsideModel) will need this defined for them on a per-entity basis like you would with a player.