Music fades by distance?

Discussion in 'Mapping Questions & Discussion' started by ProselyteCanti, Jul 10, 2014.

  1. ProselyteCanti

    ProselyteCanti L2: Junior Member

    Messages:
    91
    Positive Ratings:
    10
    I have a music room on my map. I finally got the music working, but I came across another problem with it. The farther you are from the ambient_generic, the less you can hear it. So if I'm on the other side of the map, I can barely hear the music at all. Is there a way to fix this so that you can hear it fine wherever you are on the map?

    Also, is there a way to make a music button automatically stop all other ambient generics? I know in-game you can simply type clearsound into the console, but is there an output that can do the same?
     
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    Ambient_generics have a flag you can set to have them play everywhere. Just make sure you use the raw filename for the sound, or else it won't work.

    To stop all of the other music, you could set up a logic_relay that outputs StopSound to all of the ambient_generics. You could also use a point_clientcommand or point_servercommand and have it do clearsound (I'm not sure if clearsound is a client or server command, so you'll have to check).

    VDC article on ambient_generic
    point_clientcommand
    point_servercommand
     
  3. Lampenpam

    aa Lampenpam

    Messages:
    994
    Positive Ratings:
    328
    With the client command you could make use of the play command. if a player walks into the area with the music, let them type "play <sound path>" into console. If they walk out of the area let them type "play x" into console. that will stop it from playing