Garry's Mod Wiki

Revision Difference

Entity:SetBodygroup#562780

<function name="SetBodygroup" parent="Entity" type="classfunc"> <description>Sets an entities' bodygroup.⤶ <note>If called for Weapon (after Initialize hook) with different body groups on world model and view model, check will occur by view model.</note>⤶ </description>⤶ <description>⤶ Sets the currently active <page text="Sub Model ID">Structures/BodyGroupData#submodels</page> for the Body Group corresponding to the given <page text="Body Group ID">Structures/BodyGroupData#id</page>. ⤶ <note>⤶ Weapons will return results from their viewmodels.⤶ </note>⤶ </description>⤶ <realm>Shared</realm> <args> <arg name="bodygroup" type="number">The id of the bodygroup you're setting. Starts from 0.</arg>⤶ <arg name="value" type="number">The value you're setting the bodygroup to. Starts from 0.</arg>⤶ <arg name="bodyGroupId" type="number">⤶ The Body Group ID to set the Sub Model ID of. ⤶ Body Group IDs start at `0`.⤶ </arg>⤶ <arg name="subModelId" type="number">⤶ The Sub Model ID to set as active for this Body Group. ⤶ Sub Model IDs start at `0`.⤶ </arg>⤶ </args> </function>