Garry's Mod Wiki

Revision Difference

Entity:SetBodyGroups#544782

<function name="SetBodyGroups" parent="Entity" type="classfunc"> <description>Sets the bodygroups from a string. A convenience function for <page>Entity:SetBodygroup</page>.</description>⤶ <description>Sets the bodygroups from a string. A convenience function for <page>Entity:SetBodygroup</page>.<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>⤶ <realm>Shared</realm> <args> <arg name="bodygroups" type="string">Body groups to set. Each single-digit number in the string represents a separate bodygroup. **This makes it impossible to set any bodygroup to a value higher than 9!** For that you need to use <page>Entity:SetBodygroup</page>.</arg> </args> </function> <example> <description>Example of the format</description> <code>Entity(1):SetBodyGroups( "021" )</code> <output>Sets first bodygroup value to 0, second to 2 and third to 1.</output> </example>