VERY uncooperative music files

Avatar
Fracture
797 Posts
Posted Jun 22, 2012
I played a number of maps that have had the music change via the scenery. I am attempting to implement thing, but every time i try to set the triggers to turn OFF the music from one area, IT DOESN'T LISTEN. The toggle just makes the music start all over again instead of OFF AND ON like a light switch. And the only thing that actually works is volume control, but I heard it still lags the crap out of a map when 10 songs are playing silently. I actually got a bit of lag trying to do that with up to 3 songs running.

What Is it that makes it work for everyone else?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Paradoxic R3mix
87 Posts
Posted Jun 22, 2012
Replied 44 minutes later
If you used OFF as an input, then that's the problem? Use Stopsound as the input. :S Sorry if I didn't help. I''ts 2:31 and I have this throbbing headache and hiccups... (Not a good combination).
Avatar
Fracture
797 Posts
Posted Jun 22, 2012
Replied 4 minutes later
I followed the instructions as indicated. I always cycle my options before implementing stuff. I noticed that a lot of music files behave differently and a lot of them are bugged. Why don't we get hammer to fix all their bugged audio files?
Avatar
josepezdj
2,386 Posts
Posted Jun 22, 2012
Replied 46 minutes later
Fracture, first of all I would strongly recommend you to mediate your i/o by logic_relays. This way it's easier to stop currently playing music with *cancelpeding * output.

I remember these advises by my dear friend Neco:

*Create your own 'rectangular' soundscape areas using trigger_multiples replacing the env_soundscape entities.

Create your own fade-in/fade-out logic_relays and let them trigger your desired sound files when 'start_touching' or 'end_touching' the area defined by the trigger_multiple.
The trigger_multiple method also has also the advantage to be exactly a large as the room if desired.*

img
Anyway, I guess there are some sounds that will only be stopped right when the music file has been completely played... So I'd suggest you to make sure that you don't have like 10 sound files being played at the same time... only a couple of them or 3, and to make sure they are played in big areas so you give time enough to the sound to finish playing whle the player is in another area...

Avatar
zivi7
649 Posts
Posted Jun 22, 2012
Replied 1 hour later
You have to set everything correctly in the flags and under Fade out/Fade in time for music to work properly.

For an explanation about the flags, see https://developer.valvesoftware.com/wik ... nt_generic

About the fading times: When you have set a Fade-out-time of 4 seconds in the music's options and pass a trigger that wants to fade out this music in only 3 seconds you get an error and the music continues. It has to be the same value.

Avatar
Brainstone
401 Posts
Posted Jun 22, 2012
Replied 3 hours later
I am relatively sure that I once faded out an ambient_generic by only giving it the input "fadeOut" with the parameter of the fade-out-time.

Also, you should definitey look at the "special needs" of ambient_generic entities. Several bugs there. Zivi posted the link.

Avatar
FelixGriffin
2,680 Posts
Posted Jun 22, 2012
Replied 38 minutes later
If your sounds are looping, then setting the volume through an input glitches them and breaks StopSound. That might be your problem.
Avatar
Fracture
797 Posts
Posted Jun 22, 2012
Replied 3 hours later
ugh. i hate when things are made to be this complicated
Avatar
FelixGriffin
2,680 Posts
Posted Jun 22, 2012
Replied 34 minutes later
You'd think Valve would have fixed it by now, seeing as that bug's been there ever since...Goldsource, right?
Avatar
MasterLagger
1,695 Posts
Posted Jun 22, 2012
Replied 4 hours later
Make sure the "Is NOT Looped" flag is checked. Some music loops on it's own even with the "Is NOT Looped" flag is checked. When "Is NOT Looped" flag is not checked, the music becomes uncontrollable. Hope this helps.
Avatar
Fracture
797 Posts
Posted Jun 22, 2012
Replied 3 hours later

MasterLagger wrote:
Make sure the "Is NOT Looped" flag is checked. Some music loops on it's own even with the "Is NOT Looped" flag is checked. When "Is NOT Looped" flag is not checked, the music becomes uncontrollable. Hope this helps.

OH FOR GOD'S SAKE!!! D:<

Avatar
MasterLagger
1,695 Posts
Posted Jun 22, 2012
Replied 1 hour later
I believe I just hit a nerve. Not to make things worse, but your emotion-icon is facing the wrong way. slowly backs away
Avatar
BenVlodgi
633 Posts
Posted Jun 23, 2012
Replied 2 hours later

MasterLagger wrote:
I believe I just hit a nerve. Not to make things worse, but your emotion-icon is facing the wrong way. slowly backs away

ahaha.. MasterLagger you crack me up

Avatar
Fracture
797 Posts
Posted Jun 23, 2012
Replied 47 minutes later
still not working. Can someone show me an example map with alternating music? Because I am having a hard time finding the correct tutorial for this. I have no idea what i am doing.
Avatar
Brainstone
401 Posts
Posted Jun 23, 2012
Replied 5 hours later
The example map from VALVE from the Wheatley theme has it, I think. When you touch the trigger_catapult, the music changes, if I remember that right.
Avatar
greykarel
225 Posts
Posted Jun 23, 2012
Replied 20 minutes later
Actually it's not so hard to change music. On the contrary what MasterLager said Is NOT Looped flag should be unchecked because you can stay in that area for some time that could be much longer then music file playes once and in VCD clearly said StopSound stops a looping sound, does not stop a non-looping sound.
So, in general, in every area you want to play certain music you should create ambient_generic to play music and trigger_multiple to trigger music to start and stop. In ambient_generic properties uncheck Is NOT Looped flag, name it for example music_1 and choose music file you want also you can set fade-in and fade-out time. For trigger's outputs enter OnStartTouch / music_1 / PlaySound and OnEndTouch / music_1 / StopSound. Do the same in other areas with different names of cause.
I attached .vmf and .bsp files for you to check how to do it and how it works. I hope it will help.
Attachments
music_test.zip
0.01 MB 13 downloads
Avatar
MasterLagger
1,695 Posts
Posted Jun 23, 2012
Replied 3 hours later
I thought the unchecking the "Is NOT Looped" flag made the music uncontrollable, but if what you did really works then I tip my SPY cap to you.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Fracture
797 Posts
Posted Jun 23, 2012
Replied 4 hours later
I looked at a few maps and found the method for music change varies a bit from official, to workshop, to custom. Apparently the method i was using was fine, the song i chose however WAS NOT. SEVERELY BUGGED!! So i chose something else and it works fine now.

EDIT: I forgot to read page 2 of this thread before posting this. I guess I was using a song that could not be stopped.

Thank you for the information