Sound Issues

Avatar
MasterLagger
1,695 Posts
Posted Sep 05, 2011
I'm trying to make sound start and stop in a certain area (a room sized trigger with StartTouch and EndTouch). I can get it to start, but I can't get it to stop. Is this a bug or is there something I'm missing?
Advertisement
Registered users don’t see ads! Register now!
Avatar
spongylover123
944 Posts
Posted Sep 05, 2011
Replied 1 minutes later
I think the sound file with stops when the sound ends, i don't think you can trigger it to stop, correct me if I'm wrong
Avatar
MasterLagger
1,695 Posts
Posted Sep 05, 2011
Replied 33 minutes later
Well, the music in Portal 2 loops itself, and I know that the music stops near the end of the level. I want to know how to stop the sound without killing the sound entity and without messing with the volume.
Avatar
spongylover123
944 Posts
Posted Sep 05, 2011
Replied 11 minutes later
I just tried this and it worked:

Made 2 brushes with trigger_once

Then added ambient_generic with the looping radio sound

trigger_once_1

OnStartTouch - ambient_generic - StartSound

trigger_once_2

OnStartTouch - ambient_generic - StopSound

Hope this helps

P.S In the flags section of the ambient_generic, theres a option to loop or not loop. That's how valve get the music to keep playing.

P.P.S The music only stops when you leave the map

Avatar
satchmo
415 Posts
Posted Sep 05, 2011
Replied 40 minutes later
The StopSound output only works with certain sounds.

I had the same problem, and the only way to stop the sound was to adjust the volume.

Avatar
spongylover123
944 Posts
Posted Sep 05, 2011
Replied 4 minutes later

satchmo wrote:
The StopSound output only works with certain sounds.

I had the same problem, and the only way to stop the sound was to adjust the volume.

Well it actually only works on ambient music not voice

For voices, I go with logic_choreographed_scene

Avatar
MasterLagger
1,695 Posts
Posted Sep 05, 2011
Replied 51 minutes later
My problem is that I have more that one "music" sound in my map and even if the volume is turned to 0, the map starts to get laggy when the 2nd music is active while the 1st is muted. If I could forcibly stop the 1st music, then the map shouldn't be laggy when the 2nd music is active.
Avatar
spongylover123
944 Posts
Posted Sep 05, 2011
Replied 4 minutes later
Have you tried using env_soundscape?

I think valve uses that.

EDIT: it uses a script

Avatar
MasterLagger
1,695 Posts
Posted Sep 05, 2011
Replied 4 minutes later
env_soundscape? I'll try using it tomarrow.
Avatar
ChickenMobile
2,460 Posts
Posted Sep 05, 2011
Replied 18 minutes later
I found that in coop (I'm guessing you are working on your coop playground map), sounds act differently than what it does with single player. Some sounds (especially music) cannot be stopped and a volume at 0 will not make it inaudible if the play everywhere flag is ticked.
The best way to get around this would be to use a custom env_soundscape (which spongy suggested) and make the soundscape triggerable rather than 'distance-triggerable' or 'overriding the current soundscape when it is view' like default.

Remember that env_soundscapes are a script file and go inside the scripts folder. The soundscape should be named 'soundscapes_mapnamehere'.

Attachments
soundscapes_dm_magic_ruin.txt
0.00 MB 41 downloads
Advertisement
Registered users don’t see ads! Register now!
Avatar
MasterLagger
1,695 Posts
Posted Sep 06, 2011
Replied 11 hours later

chickenmobile wrote:
I found that in coop (I'm guessing you are working on your coop playground map), sounds act differently than what it does with single player. Some sounds (especially music) cannot be stopped and a volume at 0 will not make it inaudible if the play everywhere flag is ticked.
The best way to get around this would be to use a custom env_soundscape (which spongy suggested) and make the soundscape triggerable rather than 'distance-triggerable' or 'overriding the current soundscape when it is view' like default.

Remember that env_soundscapes are a script file and go inside the scripts folder. The soundscape should be named 'soundscapes_mapnamehere'.

Response: :notwant:

Edit: It might be possible to work with soundscapes already available.