Garry's Mod Wiki

Revision Difference

Entity:SetAnimation#568376

<function name="SetAnimation" parent="Entity" type="classfunc"> <description>Sets a player's third-person animation. Mainly used by <page>Weapon</page>s to start the player's weapon attack and reload animations.</description>⤶ <description>⤶ <deprecated>Leftover function from Goldsrc transition to set player's main sequence. It is never used after 9-way walk sequence blending since Team Fortress 2. You should be using <page>GM:CalcMainActivity</page> or <page>Player:DoCustomAnimEvent</page> instead.</deprecated>⤶ ⤶ Sets a player's third-person animation. Despite the function existing for all entities, it will work only on players. </description>⤶ <realm>Shared</realm> <args> <arg name="playerAnim" type="number">Player animation, see <page>Enums/PLAYER</page>.</arg> <arg name="playerAnim" type="number">Player animation, see <page>Enums/PLAYER</page>. Only types <page text="PLAYER_ATTACK1">Enums/PLAYER</page> and <page text="PLAYER_RELOAD">Enums/PLAYER</page> play holdtype specific gestures, other enums don't do anything. </arg> </args> </function>