ambient_generic not working...

Discussion in 'Mapping Questions & Discussion' started by xArktisFlamex, Oct 20, 2010.

  1. xArktisFlamex

    xArktisFlamex L1: Registered

    Messages:
    17
    Positive Ratings:
    3
    I tried using this tutorial: http://developer.valvesoftware.com/wiki/TF2/Creating_Audio_Playing_Buttons

    In my map, when you hit the button, text is supposed to appear on the screen and music is supposed to start playing.

    The text appears, but the music doesn't start playing.
    I tried using official source sounds but they don't play either. Is there something I'm supposed to do that this tutorial isn't telling me? :(
     
  2. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    Did you check the "Play Everywhere" flag?
     
  3. xArktisFlamex

    xArktisFlamex L1: Registered

    Messages:
    17
    Positive Ratings:
    3
    Yes, and I turned it back off and tried again. I played around with the Max Audible Distance, too
     
  4. xArktisFlamex

    xArktisFlamex L1: Registered

    Messages:
    17
    Positive Ratings:
    3
    Anyone have a solution? :(
     
  5. Batandy

    Batandy L3: Member

    Messages:
    132
    Positive Ratings:
    54
    Make sure that the sound file is set to the right frequency : if hammer plays it it doesn't mean that the game can play it, check the console when you are in the map
     
  6. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    first, test if the problem is from the map, or from the audio file. to do this, test if your music works. in console type "play [tf/sound/]folder/filename.wav"

    but don't type [tf/sound/]. I'm just telling you where it's playing from.

    if your audio plays, then its a map problem...
    but if the sound doesn't play then its a audio file problem.

    some common audio problems: make sure its at an acceptable frequency (eg. 44100, 22050, 11025) and make sure its a PCM .wav file. (Usually you don't have to worry about the frequency)
     
  7. xArktisFlamex

    xArktisFlamex L1: Registered

    Messages:
    17
    Positive Ratings:
    3
    Ok, using the console command, the music plays properly (although it's a little quiet, but I can fix that)

    So what's the map problem?
     
  8. xArktisFlamex

    xArktisFlamex L1: Registered

    Messages:
    17
    Positive Ratings:
    3
    Is there a way to make it so that, when the button is damaged, it launches the console code instead?
     
  9. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    you'll have to do some trial and error, but since its a map problem its definitely solvable. try making a row of amient_generics with different settings and see which one works. it's hard to help you without seeing the exact situation. hope that helps.
     
  10. xArktisFlamex

    xArktisFlamex L1: Registered

    Messages:
    17
    Positive Ratings:
    3
    I just checked the "Play everywhere" flag again and it works now...
    Also, my sound is showing up in the browse list, it didn't do that before.

    I tried using a different song and it didn't play. So I switched back and it played again.
    I saved the other sound in the same exact folder using the same file type.
    Is there something I have to do to make the song show up on the browse list?

    If I could figure this out, it would be awesome to play different songs when certain conditions are met
     
  11. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Like others said, you saved it in the same folder and also as a wav, but are both wav files the same frequency?

    also, every time you add a new sound you have the refresh the sounds in the menu you use to pick which sound to play - there's a button for that.

    also also, songs that have the "is not looped" flag checked won't always respond to the StopSound output. Even if they aren't looped, unchecking that will often fix the problem though it won't make the song looped unless you edited the wav file to actually loop.