How to add custom soundscripts to your map?

Discussion in 'Mapping Questions & Discussion' started by PoisonHeadcrab, Apr 9, 2011.

  1. PoisonHeadcrab

    PoisonHeadcrab L1: Registered

    Messages:
    14
    Positive Ratings:
    0
    So, I've now been desperately trying to implement a sound in my map that would play from a location with a desired attenuation. Since just pointing at my soundfile with an "ambient_generic" only resulted in the sound being played too loud right next to the source but already inaudible two meters away, I knew I had to make a soundscript.

    Problem is, I have no clue where to put the piece of code, so that it can be played through the ambient_generic. I tried putting it into a file that is "maps/<mapname>_level_sounds.txt", like advised in the Valve Developer Wiki, but that doesn't work for me at all. And I'm just not sure about whether it wouldn't cause problems when putting an edited "game_sounds", or "game_sounds_manifest" into my final bsp file.

    Does anyone has an idea how to solve this?
     
  2. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    You could try changing the Volume and Max Audible Distance keyvalues for the ambient_generic, that should fix your problems.
     
  3. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,492
    [thread]7000[/thread] soundscapes
    [thread]9300[/thread] making your own soundscape
     
  4. PoisonHeadcrab

    PoisonHeadcrab L1: Registered

    Messages:
    14
    Positive Ratings:
    0
    Thanks alot, that pretty much let me adjust the sound to what I need it to be :D
    Was probably just a bit shy to put in insane distances, because it really looks like if you'd type 5000, the max distance would actually look more like 500 ingame.

    Also, I've already looked into soundscapes, but they don't really seem like an option for this particular case, as I have other uses for those, that would have to overlap the sounds I'm trying to create.
     
  5. PoisonHeadcrab

    PoisonHeadcrab L1: Registered

    Messages:
    14
    Positive Ratings:
    0
    Alright, I just figured I'd need to make the sound much louder, however the only option would be to edit the .wav to make it louder (volume settings in hammer all maxed out already).
    When I do that however, there's a huge loss of quality, because of the high-amplitude waves being cut off. It looks I'll still need a script to achieve this (soundscapes also not an option, since I already have a use for that, the sound should play on top of that). :(

    So, question again, how do I make a proper soundscript for my custom map, or is that even possible?
     
  6. ardysqrrl

    ardysqrrl L4: Comfortable Member

    Messages:
    173
    Positive Ratings:
    159
  7. PoisonHeadcrab

    PoisonHeadcrab L1: Registered

    Messages:
    14
    Positive Ratings:
    0
    I already read that site, and the concept of a code entry representing a sound that can be accessed in hammer is very understandable to me. But have no idea in what file to put this piece of code whatsoever, so that it is and will be loaded when that script file is packed into the final .bsp.

    I thought that creating a "maps/<mapname>_level_sounds.txt" for your custom map and putting the code in there would do the thing, but I later figured that doesn't work for me.

    What files exactly do I have to edit and how, and how should I later pack them into the final .bsp?
     
  8. ardysqrrl

    ardysqrrl L4: Comfortable Member

    Messages:
    173
    Positive Ratings:
    159
    I'm not sure did you try making a game_sounds_manifest.txt
     
  9. Aliensoldier

    Aliensoldier L1: Registered

    Messages:
    25
    Positive Ratings:
    0
    Sorry for "excavating" a old thread, but I think I know the solution for this.
    creating a file "maps/<mapname>_level_sounds.txt" should work, but you can't choose it with the Hammer Sound Browser 'cuz it's not listed in the manifest file.
    Now you just simply need to open your soundscript, copy the name of the defined sound you want and paste it into the ambient_generic.
    It works on the same princip for l4d.
     
    Last edited: Aug 11, 2011