Garry's Mod Wiki

GM:MouthMoveAnimation

GM:MouthMoveAnimation( Player ply )

Description

Override this gamemode function to disable mouth movement when talking on voice chat.

Arguments

1 Player ply
Player in question

Example

The default functionality taken from the base gamemode.

function GM:MouthMoveAnimation( ply ) local flexes = { ply:GetFlexIDByName( "jaw_drop" ), ply:GetFlexIDByName( "left_part" ), ply:GetFlexIDByName( "right_part" ), ply:GetFlexIDByName( "left_mouth_drop" ), ply:GetFlexIDByName( "right_mouth_drop" ) } local weight = ply:IsSpeaking() && math.Clamp( ply:VoiceVolume() * 2, 0, 2 ) || 0 for k, v in pairs( flexes ) do ply:SetFlexWeight( v, weight ) end end

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 4
Generate Html 5
SaveChanges (1) 9
Render Body 0
Render Sidebar 11