Ambient_generic

Avatar
Haggis
158 Posts
Posted Jun 18, 2011
I followed a tutorial on youtube for this but i cant get it to work. What i did was place a button and added these outputs

Onpressed Music playsound

I also set up a trigger

Ontrigger Music Playsound

But it still did not work, what am i doing wrong.

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jun 18, 2011
Replied 3 minutes later
Does the music have the correct path name? Could be that you are following a tutorial for another source game which does not have the sound in the Portal files.
If not, check if you have 'is not looping checked' in the flags tab.
Avatar
Haggis
158 Posts
Posted Jun 18, 2011
Replied 9 minutes later
It was a Portal 2 tutorial, is NOT looped is checked. When i double click the generic, i click on sound name then browse, i have choosen 1 of the music files that are in the menu.
Avatar
ChickenMobile
2,460 Posts
Posted Jun 18, 2011
Replied 9 minutes later
Check the Volume value is set to 10 (or full) and the radius of the sound is big enough for your player to hear it. If you want the music to play everywhere make sure you click the 'Play Everywhere' tick in the flags tab.

Also on your trigger make sure it is "onStartTouch" not onTrigger. It will not activate otherwise.

Avatar
Haggis
158 Posts
Posted Jun 18, 2011
Replied 17 minutes later
The volume is set to 10 and the radius is big enough. Changed the trigger to onstarttouch, but still cant hear it. I tried play everywhere as well, but stil no sound.
Avatar
Vordwann
767 Posts
Posted Jun 18, 2011
Replied 15 minutes later
The music only works if you change your source folder to .raw
Avatar
Haggis
158 Posts
Posted Jun 18, 2011
Replied 2 minutes later
It is set to Raw
Avatar
Darkylight
81 Posts
Posted Jun 18, 2011
Replied 10 minutes later
Is it only in hammer or running too? I cant hear sounds in hammer but yeah ingame.
Avatar
Vordwann
767 Posts
Posted Jun 18, 2011
Replied 16 minutes later
Have you set a range for the sound, start active, or in the flags checked play everywhere to get it to work?
Avatar
Haggis
158 Posts
Posted Jun 18, 2011
Replied 10 minutes later
Tried play everywhere, but still did not work.
Avatar
MasterLagger
1,695 Posts
Posted Jun 18, 2011
Replied 6 hours later
raw. music is the problem. Try this:

1) Create a new ambient_generic
2) Make sure the music you load is "Game Sound" not raw. It should be soundscape or something like that.
3) Go to flags, click Play Everywhere, DO NOT enable looping. The soundscape music automatically loops itself.
4) Use trigger with Output of "OnStartTouch" to play the music.

BTW: Looping music may not turn off when you want it to, however you can change it's volume to 0 :biggrin:

Avatar
Haggis
158 Posts
Posted Jun 19, 2011
Replied 12 hours later
I changed the music to an alarm sound and it worked, its just the music that i cant get to work. I changed the setting to gamesound but i still could not hear the music.
Avatar
Marise
249 Posts
Posted Jun 19, 2011
Replied 4 hours later
This seems like a good thread to ask this... Does anyone know a way to make the tick-tock sound effect loop? Or would I have to alter the raw .wav file?
Avatar
MasterLagger
1,695 Posts
Posted Jun 19, 2011
Replied 12 minutes later
Something else I want to add: Not all sounds/music on the browse list is playable.
Avatar
Vordwann
767 Posts
Posted Jun 19, 2011
Replied 2 hours later
Yeah that's why I lined the Cave Johnson sound files wiki in case anyone wanted to know what the different files say.
Avatar
Haggis
158 Posts
Posted Jun 19, 2011
Replied 4 hours later

MasterLagger wrote:
Something else I want to add: Not all sounds/music on the browse list is playable.

The piece of music i chose was playable in the browser, i pressed the preview button and it played. Even though i can hear the preview will some files not play ingame.

Avatar
snaxel
1 Posts
Posted Jun 20, 2011
Replied 11 hours later
Just a quick question.
What is the filename for the "when life gives you lemons speech" - by cave johnson.
and does it work ingame or is it broken. Because I hear alot of the files won't work.
Avatar
Vordwann
767 Posts
Posted Jun 20, 2011
Replied 5 hours later
You can find it here: http://theportalwiki.com/wiki/Cave_Johnson_voice_lines

but it is...

cave_johnson_80s_outro_09.wav
cave_johnson_80s_outro_11.wav

that's it...

Avatar
Haggis
158 Posts
Posted Jun 20, 2011
Replied 2 hours later
Surely someone knows how to get music to play ingame. I know its a big ask but could someone please make me a .vmf with a button in it, that whaen i press it, a piece of music plays, just to see what i am doing wrong, thanks
Advertisement
Registered users don’t see ads! Register now!
Avatar
The Irate Pirate
236 Posts
Posted Jun 20, 2011
Replied 4 minutes later
You have to name the sound file and the trigger for them to work. Just an FYI.