Revision Difference
Entity:GetBodygroupCount#562777
<function name="GetBodygroupCount" parent="Entity" type="classfunc">
<description>
Returns the count of possible values for this bodygroup.
This is **not** the maximum value, since the bodygroups start with 0, not 1.
<note>If called for Weapon (after Initialize hook) with different body groups on world model and view model will return value form view model.</note>
</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>⤶
<realm>Shared</realm>
<args>
<arg name="bodygroup" type="number">The ID of bodygroup to retrieve count of.</arg>⤶
<arg name="bodyGroupId" type="number">⤶
The Body Group ID to retrieve the Sub Model count of.⤶
</arg>⤶
</args>
<rets>
<ret name="" type="number">Count of values of passed bodygroup.</ret>
<ret name="" type="number">The number of Sub Models in the Body Group.</ret>
</rets>
</function>