I can play ambient_generic entities via trigger but since the entity doesn't move, the volume varies as the player passes by the entity. I want the volume to be constant. The sound will only play once as the player goes through a door.
I can't parent ambient_generic entities directly, so I think I need to parent another nameable entity to the sound (info_target?) and then parent that entity to the player via my trigger_once (or perhaps logic_auto?). Afterwards, those 2 entities can just disappear.
Also how do I remove those 2 entities from the map after the sound is played or does it happen automatically?
Check the "play everywhere" flag.
[QUOTE=IronPhoenix;39917024]Check the "play everywhere" flag.[/QUOTE]
I wondered if that was for just the player or was it global and everyone hears it.
[QUOTE=forkprong;39917076]I wondered if that was for just the player or was it global and everyone hears it.[/QUOTE]
Everyone will hear it no matter what you do.
[QUOTE=IronPhoenix;39917112]Everyone will hear it no matter what you do.[/QUOTE]
The ambient_generics I've used before had a limited range so why would everyone hear it no matter what I do?
What do I do if I just want the player passing through a trigger to hear it?
Sound like that would probably have to function like the suit voices from Half Life. Actually I'm not sure if that would work since I don't recall hearing them in multiplayer.
I'm almost POSITIVE there is a setting on the ambient_generic that lets you choose where the sound originates from.
If there is, I'd probably have to do some trickery to get it work correctly.
[editline]15th March 2013[/editline]
Ok so I've messed around with it, and it doesn't seem to be possible. You can change the SourceEntityName, but you can't dynamically call on it (like when using the AddOutput command).
It seems like it's only something that can be changed in Hammer's settings. It's 6 in the morning when I tried this stuff out, so I may not be thinking clearly on it. If someone wants to give it a shot, go right ahead.
use point_clientcommand with playgamesound, it will jsut play the sound on the client side
[QUOTE=slayer20;39920157]I'm almost POSITIVE there is a setting on the ambient_generic that lets you choose where the sound originates from.
If there is, I'd probably have to do some trickery to get it work correctly.[/QUOTE]
That's basically how I described it. I need to make a trigger that:
1. Temporarily parents an entity to just the player passing through the trigger (likely info_target)
2. Play the sound through that entity.
3. Kill the entity that channels the sound
4. Probably kill the sound too. (Will using KillHierarchy kill both entities for me?).
I'm not sure if killing the entities will kill it just for the player or for everyone.
I want everyone to have the opportunity to hear the sound as they walk through the door, to be able to hear it once and to not hear it globally.
[media]http://www.youtube.com/watch?v=rzeCrWCkqoQ[/media]
at 6s there is a trigger as you fall down which does point_clientcommand playgamesound sounds/song.mp3
why are you making it so complicated
Edit: Do what Kwaq said :v:
I'm not super familiar with console commands (although I guess I should be), but I did think of an alternative if you don't want to go down the point_clientcommand route.
[QUOTE=Kwaq;39920541]use point_clientcommand with playgamesound, it will jsut play the sound on the client side[/QUOTE]
Could you go into more detail? I'm not familiar with those entities and don't know what you want me to do exactly. I don't see a playgamesound entity.
[editline]15th March 2013[/editline]
[QUOTE=Kwaq;39920834]*video*
at 6s there is a trigger as you fall down which does point_clientcommand playgamesound sounds/song.mp3
why are you making it so complicated[/QUOTE]
Because I don't know what the Hell I'm doing, obviously.
Nice vid, though.
put the sound somewhere relative to your sound/ directory (sound/soundname.mp3), then in the game try typing
playgamesound soundname.mp3
or
play soundname.mp3
(this is just to check that the sound works)
then in hammer make a point_clientcommand with a reference
[img]http://puu.sh/2i475[/img]
then make the trigger_multiple or whatever to trigger the sound; with the output to the clientcommand
[img]http://puu.sh/2i48D[/img]
if that doesn't work, check that clients are flagged, then if it doesnt work still,
try adding single quotes around the parameter override or double quotes (can't remember if this works.)
afaik i could only get sound inside the sound/ directory to work, adding extra folders broke it
if you ever want to do this for lots of sounds and with fading effects, i suggest you learn how to use soundscapes in source! a little harder to work with but way better for immersion
[QUOTE=slayer20;39920852]Edit: Do what Kwaq said :v:
I'm not super familiar with console commands (although I guess I should be), but I did think of an alternative if you don't want to go down the point_clientcommand route.[/QUOTE]
May as well post it. For science.
[editline]15th March 2013[/editline]
[QUOTE=Kwaq;39920971]thorough explanation[/QUOTE]
Is there a difference between 'play' and 'playgamesound'?
Just so everyone knows the sound I'm trying to make work isn't a custom sound. It's:
vo/citadel/gman_exit01.wav
In other words: "Time?...Doctor Freeman?"
[QUOTE=forkprong;39920974]
Is there a difference between 'play' and 'playgamesound'?
[/QUOTE]
playgamesound can 'stack' sounds on top of each other
play will cancel the previous sound when the next is played
[QUOTE=Kwaq;39921140]playgamesound can 'stack' sounds on top of each other
play will cancel the previous sound when the next is played[/QUOTE]
Gotcha.
Thanks everyone. I should be fine now.
Update: nothing working so far...
Are you sure its the 'AddOutput' target you are supposed to use and not the 'Command' target?
Right now my map is crashing the sdk like crazy and I don't know how to fix it. Refreshing SDK content isn't working.
actually you are right its command for that i was thinking of ent_fire or something
[QUOTE=Kwaq;39925722]actually you are right its command for that i was thinking of ent_fire or something[/QUOTE]
When I can get Hammer to behave again I'll retry.
Out of curiosity what can you output from an ent_fire?
any entity
Okay I got the sound to work...in CSS.
I load the map in Gmod and I get nothing.
How do I get sound that functioned in CSS to work in Gmod.
One is a custom sound that I put in the cstrike/sound folder and have actually pakratted but it still doesn't play. They are played by ambient_generic entities.
The other sound is the gman sound I mentioned earlier (vo/citadel/gman_exit01.wav) which should have be audible since both HL2 and CSS are mounted.
[editline]15th March 2013[/editline]
In addition:
NEVER EVER PUT QUOTES (namely ") IN YOU MAP. Trying your double-quote suggestion is what caused the permanent fail-to-load in Hammer for my map. I currently have a quoteless path to the sound written in.
[url]http://facepunch.com/showthread.php?t=916414[/url]
Also I gotta try that ent_fire AddOutput thing you mentioned. I'm going to try to make a deathrun map after this and fire sounds like an interesting gimmick.
Out of curiosity how would I extract the gman's wav files? I have GCFScape but I don't know where it is located.
vo/citadel/gman_exit01.wav
Nabbing npc_gman and pakratting that would be useful too. Where is that model/entity at?
should be hl2/sound/
(source sounds)
then hl2/materials/models
hl2/models
(source materials/models)
[QUOTE=Kwaq;39933136]should be hl2/sound/[/QUOTE]
As in c:\Program Files(x86)\Steam\steamapps\...\Half-Life 2/hl2/sound? Not even close. Just has a sample sound of Alex.
Is it in a GCF? Know which one?
EDIT
Disregard. source sounds.gcf
[editline]16th March 2013[/editline]
Now all I got to worry about is getting the sounds to work in Gmod. They work fine in CSS but not in Gmod and I don't know how.
If you also know how I can extract the npc_gman entity it would also be useful. He doesn't show up in GMod for some reason.
[editline]16th March 2013[/editline]
THink I found it in source models.gcf
I went to hl2/models/Humand and extracted everything with 'gman' in the title.
Okay no gman files. I realize that's a no-no.
That being said, the only problem now is that I can't get the sounds that work in cstrike to work in gmod. No idea what I'm doing wrong. If I have a setting wrong in gmod, or I am missing something in regards to pakrat.
The gman voice should work since I have hl2 and css mounted in gmod but it doesn't.
My custom sound was pakratted but doesn't play.
I would think I disabled sound in gmod somehow but sound works fine when I'm gaming. It's just my map that isn't working.
Sorry, you need to Log In to post a reply to this thread.