Scripted sequences do not raise GM:EntityEmitSound
Sounds emitted during scripted sequences don't raise EntityEmitSound.
hook.Add( "EntityEmitSound", "1", function( data ) print( data.SoundName ) end )
You can run this shared - only sounds emitted on the client raise EntityEmitSound, but that makes sense. Play on a map that uses them - d1_trainstation_xx have sequences near the spawns.
Seems to be working in singleplayer, unable to get it to function in multiplayer.
Any updates?
Cannot reproduce this. Besides sounds from from sentences.txt (https://github.com/Facepunch/garrysmod-requests/issues/2005) all other sounds are correctly captured by the hook.
I used this code and ran around all the HL2 intro maps in multiplayer:
hook.Add( "EntityEmitSound", "TimeWarpSounds", function( t )
t.Pitch = t.Pitch * 2.5
if ( string.find( t.SoundName, "loop" ) ) then return true end
if ( string.find( t.SoundName, "null.wav" ) ) then return true end
print( t.SoundName, t.OriginalSoundName )
return true
end )
I am going to assume this was about https://github.com/Facepunch/garrysmod-requests/issues/2005 or was fixed since.