Garry's Mod Wiki

Revision Difference

Entity:GetBodygroupCount#562784

<function name="GetBodygroupCount" parent="Entity" type="classfunc"> <description> Returns the number of <page text="Sub Models">Entity:GetSubModels</page> in a given Body Group of the <page text="Entity's">Entity</page> model. ⤶ This is **not** the maximum value, as Body Group IDs start with `0`. Subtract `1` from the value returned by this function to get the maximum Body Group ID for the entity. ⤶ </description>⤶ Returns the number of <page text="Sub Models">Entity:GetSubModels</page> in the Body Group corresponding to a given Body Group ID of the <page text="Entity's">Entity</page> model. ⤶ This is **not** the maximum value, as Body Group IDs start with `0`. Subtract `1` from the value returned by this function to get the maximum Body Group ID for the entity. ⤶ <note>⤶ Weapons will return results from their viewmodels.⤶ </note>⤶ </description>⤶ <realm>Shared</realm> <args> <arg name="bodyGroupId" type="number"> The Body Group ID to retrieve the Sub Model count of. Body Group IDs start at `0`. </arg> </args> <rets> <ret name="" type="number"> The number of Sub Models in the Body Group. </ret> </rets> </function>