Music fades by distance?

ProselyteCanti

L2: Junior Member
Mar 27, 2014
91
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?
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
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
 
Mar 23, 2013
1,013
347
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