Soundscript for Blu/Red Announcements Problem

Discussion in 'Mapping Questions & Discussion' started by XEnderFaceX, Oct 17, 2017.

  1. XEnderFaceX

    XEnderFaceX L2: Junior Member

    Messages:
    73
    Positive Ratings:
    10
    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?
     
  2. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,372
    Positive Ratings:
    4,167
    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: Oct 17, 2017
  3. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    58
    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: Oct 17, 2017