Soundscript for Blu/Red Announcements Problem

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.

XEnderFaceX

F1 Fan
aa
Aug 18, 2015
297
Hi

im making a Frontline themed Map, i want to use the unused Voicelines for Payload Race.
i made a Soundscript and placed them into the Scripts folder, they look like this:

"Announcer.RedB"
{
"volume" "1"
"pitch" "10,250"
"wave" "announcer_sound\announcer_plr_racegeneral11.wav"
}

"Announcer.BluB"
{
"volume" "1"
"pitch" "10,250"
"wave" "announcer_sound\announcer_plr_racegeneral12.wav"
}
}

They show up in Hammer, but when im ingame, it gives me this error:

CSoundEmitterSystemBase::GetParametersForSound: No such Sound Announcer.RedB
CSoundEmitterSystemBase::GetParametersForSound: No such Sound Announcer.BluB

Whats causing this?
 

Muddy

Muddy
aa
Sep 5, 2014
2,512
It's possible it's because you're missing the "channel" property.

This is how I lay out my soundscripts:
Code:
"Sound.Name"
{
    channel        CHAN_VOICE2
    volume        VOL_NORM
    pitch        PITCH_NORM
    soundlevel    SNDLVL_NORM
    wave        your_map/announcer_intro_1.mp3
    wave        your_map/announcer_intro_2.mp3
    wave        your_map/announcer_intro_3.mp3
}

EDIT: Missed this earlier, but soundscript files are meant to go in tf/maps, not tf/scripts
 
Last edited:

Powerlord

L3: Member
May 8, 2010
127
OK, I admit I haven't done map soundscripts before, but looking at the source code for the Source SDK 2013 (which is based on TF2), the server does this:

1. Takes the map filename (but not the directory)
2. Puts maps/ in front of it.
3. Changes it to lowercase.
4. Removes any file extensions.
5. Adds _level_sounds.txt to the end

So, if your map was named:

Code:
bacon_b3.bsp
the soundscript file for it would be
Code:
maps/bacon_b3_level_sounds.txt

(Note: This means the soundscript is in the same directory as the map)

Edit: This is documented on lines 260 - 305 of SoundEmitterSystem.cpp
 
Last edited: