View Single Post
Dreadnaught
Junior Member
Join Date: Jun 2013
Old 06-12-2013 , 20:56   Re: Help! Placing custom sounds to my server
Reply With Quote #6

Quote:
Originally Posted by Powerlord View Post
The problem is that clients already think they have those sounds.

I haven't tested it, but I suspect it uses the teamplay_broadcast_audio event. You can intercept this event, read its "sound" value, and broadcast a new sound manually (using SourceMod's EmitSoundToAll). Note that these sounds should have different names than the sounds they're replacing. Or be in a different directory.

The "sound" values for MvM things you've mentioned are:

"music.mvm_end_last_wave"
"music.mvm_end_mid_wave"
"music.mvm_end_tank_wave"
"music.mvm_end_wave"
"music.mvm_lost_wave"
"music.mvm_start_last_wave"
"music.mvm_start_mid_wave"
"music.mvm_start_tank_wave"
"music.mvm_start_wave"
"MVM.BombWarning"
"MVM.PlayerDied"
"MVM.TankStart"

These names are keys from the various game_sound files inside tf2_misc_dir.vpk. Specifically, from scripts/game_sounds_music.txt and scripts/game_sounds_mvm.txt. Valve uses these to store which channel, volume, pitch, soundlevel, and wave file to play in a single location. Only sounds broadcast to all players on a team are sent via teamplay_broadcast_audio... examples include the non-MvM lose and win sounds.
Looks like I got it. Well, if I change the name of these sounds, and put those names changed in game_sounds_mvm.txt, other players will download the music changed?
Dreadnaught is offline