Garry's Mod Wiki

Revision Difference

Entity:FindBodygroupByName#562791

<function name="FindBodygroupByName" parent="Entity" type="classfunc"> <description>Searches for bodygroup with given name.⤶ <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>⤶ <description>⤶ Searches the <page text="Entity's">Entity</page> model for a Body Group with a given name. <note>⤶ Weapons will return results from their viewmodels.⤶ </note>⤶ </description>⤶ <realm>Shared</realm> <args> <arg name="name" type="string">The bodygroup name to search for.</arg>⤶ <arg name="name" type="string">⤶ The name to search for.⤶ </arg>⤶ </args> <rets> <ret name="" type="number">Bodygroup ID, -1 if not found</ret>⤶ <ret name="" type="number">⤶ The <page text="Body Group's ID">Structures/BodyGroupData#id</page> or `-1` if no Body Group has the provided name.⤶ </ret>⤶ </rets> </function>