WHAT am I doing wrong re: triggering music?

Avatar
Lunch
85 Posts
Posted Sep 15, 2014
I'm stumped. Does anyone see something mislabeled or flagged?

The situation is so basic. You walk through a door into a trigger, and it should make an ambient_generic play. It doesn't.

This is the class info for the trigger_once:

And its output:

The info for the ambient_generic:

And its flags:

Advertisement
Registered users don't see ads! Register now!
Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 4 minutes later
The .WAV is from RAW and not gamesounds, btw. I keep reading that that matters.

There's already an env_soundscape playing when this gets triggered, in case that's a factor.

Avatar
Arachnaphob
412 Posts
Posted Sep 15, 2014
Replied 6 minutes later
The trigger starts disabled. Set 'starts disabled' to no and it should work.
Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 53 minutes later

Arachnaphob wrote:
The trigger starts disabled. Set 'starts disabled' to no and it should work.

I was super excited that you'd solved the problem. Sadly, making that change didn't have any effect. The damned music still won't play.

Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 3 hours later
I got rid of the trigger and set the sound to play as an OnPressed output of a button.

Still no luck. I could basically publish this map if I could just sort out this music problem.

Avatar
FelixGriffin
2,680 Posts
Posted Sep 15, 2014
Replied 1 hour later
Use developer 2 to see if the input is being triggered.
Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 23 minutes later

FelixGriffin wrote:
Use developer 2 to see if the input is being triggered.

What command in the console should I use to check? Nothing comes up automatically when the button's pressed and I go to the console.

Avatar
Netherskate
4 Posts
Posted Sep 15, 2014
Replied 5 minutes later

Not sure if it helps at all, but did you type in the .wav file into the sound name manually? I tried to do so, and then tried to preview it straight from there (using the play button), but the music did not play. I typed it into the filter, and previewed it there, where it did play, and I selected it without copying the name with copy and paste... if that makes sense.

Though there is a chance I could have typed it incorrectly?

I had set up a horribly basic map to try it out. It is literally just a simple box with trigger, spawn, and the music thing.

Here are a few screenshots, that I took even if you do not need them.
Links as my screenshots are super big.

http://i.imgur.com/Nux1KRw.png - Music Trigger.

http://i.imgur.com/fZxUmNF.png - Music Trigger outputs

http://i.imgur.com/hGCR6Q2.png - Not sure if this is useful, but here are the Music Trigger flags.

http://i.imgur.com/rIeKVrP.png - Ambient Generic, named Music.

http://i.imgur.com/ivKuroi.png - Ambient Generic Input coming from the Trigger. There are no outputs, obviously.

http://i.imgur.com/zZGzVl4.png - Ambient Generic Flags.

I did take notice that you used OnStartTouch instead of OnTrigger. In my experience, both do work, though I suggest trying the OnTrigger just in case?

As a note, I also tried replacing the trigger with a button, and it worked fine.

Edit: Added an Env_Soundscape attached to the button, left everything else above alone. They both seemed to work together for me.

Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 14 minutes later

Netherskate wrote:
This post is probably useless, but I tried to help anyway?

And I definitely appreciate it.

The only reason I'm using OnStartTouch is because people have told me that I need to use that instead of OnTrigger. Does anyone else here believe otherwise?

I didn't type the WAV name in. I browsed the gamesounds folder and chose it from there. Again, thanks for the suggestion.

Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 55 minutes later
I just did an experiment sort of like Netherskate, where I started a new map, built a small room and put a button and an ambient_generic in it. Interesting result: When the amb_gen was set to a sound effect, it would work. When I'd set it to music, it wouldn't.
Avatar
TeamSpen210
608 Posts
Posted Sep 15, 2014
Replied 1 hour later
Have you tried using the soundscript version (music.something)? That should work a lot better.
Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 6 minutes later

TeamSpen210 wrote:
Have you tried using the soundscript version (music.something)? That should work a lot better.

The what? Can you explain? Is that a category of wav file in either the RAW or game sound folder?

Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 2 minutes later
Also, what do I recall hearing about clearing your Portal 2 audio cache? Could that be related?
Avatar
FelixGriffin
2,680 Posts
Posted Sep 15, 2014
Replied 26 minutes later

Lunch wrote:
FelixGriffin wrote:

Use developer 2 to see if the input is being triggered.

What command in the console should I use to check? Nothing comes up automatically when the button's pressed and I go to the console.

"developer 2".

But given the additional information, I don't think that's the problem.

Is this a custom sound?

Avatar
Lunch
85 Posts
Posted Sep 15, 2014
Replied 1 hour later

FelixGriffin wrote:
Lunch wrote:

FelixGriffin wrote:

Use developer 2 to see if the input is being triggered.

What command in the console should I use to check? Nothing comes up automatically when the button's pressed and I go to the console.

"developer 2".

But given the additional information, I don't think that's the problem.

Is this a custom sound?

Ah, good question. Nope. Just regular music from Portal 2.

Avatar
FelixGriffin
2,680 Posts
Posted Sep 15, 2014
Replied 2 hours later

In that case it (almost*) certainly has a soundscript. What is the name that you're using right now?

  • I believe there are only two music files in the game without soundscript entries, but there may be more that I've missed.
Avatar
Lunch
85 Posts
Posted Sep 16, 2014
Replied 10 hours later

FelixGriffin wrote:
In that case it (almost*) certainly has a soundscript. What is the name that you're using right now?

  • I believe there are only two music files in the game without soundscript entries, but there may be more that I've missed.

Okay. Right now let's just try to solve the issue in the basic room I created last night in order to isolate the problem. I have a single button triggering an ambient_generic. If I have it set to a sound effect, it works. Music is always silent.

Currently, the sound I have it set to is music.ctc_b1_001, from the game sounds folder.

Thanks for your help.

Avatar
Lunch
85 Posts
Posted Sep 16, 2014
Replied 19 minutes later
I just used Developer 2 (thanks for that tip -- I didn't even know it existed and I love it), and when I pushed the button, this is what came up. "Laugh" is the name of the sound file.

(Ignore the frame rate thing from Overwolf)

Avatar
TeamSpen210
608 Posts
Posted Sep 16, 2014
Replied 4 hours later
Could your music be muted in options? Also make sure in 'flags' that Play Everywhere is checked, Start Silent is checked and Is Not Looped is unchecked.
Advertisement
Registered users don't see ads! Register now!
Avatar
Lunch
85 Posts
Posted Sep 16, 2014
Replied 3 minutes later

TeamSpen210 wrote:
Could your music be muted in options? Also make sure in 'flags' that Play Everywhere is checked, Start Silent is checked and Is Not Looped is unchecked.

Yep. All of that stuff is set correctly.