ambient_generic wont play on trigger

ambient_generic wont play on trigger

Re: ambient_generic wont play on trigger Posted by MrBehemoth on Mon May 14th 2007 at 6:04pm
MrBehemoth
4 posts
Posted 2007-05-14 6:04pm
4 posts 0 snarkmarks Registered: May 14th 2007 Occupation: wannabe level designer Location: UK
hi folks!

I've searched everywhere and I keep finding people who seem to have had the same problem with HL2 ambient_generics but it seems like nobody ever got to the bottom of it. So if this is old news, forgive me for bringing it up again. :rolleyes: Also, if this a double-post then sorry again, something screwy just happened to IE.

What happens is this:

I have an ambient_generic and I want it to play once when triggered with the PlaySound input, so I check the 'Start Silent' and 'Is NOT Looped' flags. But it doesn't play. There are no error messages.

If I uncheck 'Start Silent' so that it will play once on spawn then it works.

It ocurred to me that maybe the 'Is NOT Looped' flag is only supposed to be used when you do have a looping sound (mine isn't) but you don't want it to loop, so I tried unchecking that. It will still play on spawn if 'Start Silent' is blank, but not when triggered if 'Start Silent' is checked.

Incidentally, the sound I'm trying to use is a 44100 Hz mono mp3 in the root of my mod's sound folder, registered in a sound script and played as a game sound. Since it will play on spawn, I'm assuming that the file-type and sound scripts are all set up properly. I've also had the same problem in the past using what Hammer calls 'raw' sounds (some of them looping, I think). It also doesn't matter whether I use a custom sound or a Valve-made one.

I've had this problem for a while in a few different maps, but I've been modding HL2 on and off since it was released and I don't remember always having this problem. Anyone got any ideas?
Re: ambient_generic wont play on trigger Posted by Stadric on Mon May 14th 2007 at 11:49pm
Stadric
848 posts
Posted 2007-05-14 11:49pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
How are you triggering the ambient_generic? Different inputs do different things.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: ambient_generic wont play on trigger Posted by MrBehemoth on Tue May 15th 2007 at 7:11am
MrBehemoth
4 posts
Posted 2007-05-15 7:11am
4 posts 0 snarkmarks Registered: May 14th 2007 Occupation: wannabe level designer Location: UK
I am typing 'ent_fire dogbarksound PlaySound' or whatever at the console to test it, but I'm sure that does exactly the same thing as if I set up up a trigger brush or logic entity to trigger it.
Re: ambient_generic wont play on trigger Posted by Riven on Tue May 15th 2007 at 1:10pm
Riven
1640 posts
Posted 2007-05-15 1:10pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Hmm, I've never tried that before on an ambient_generic, but I wouldn't count on it either. Go ahead and try using a trigger_once or some logic entity and let us know if that works. Their not that hard to set up.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: ambient_generic wont play on trigger Posted by MrBehemoth on Tue May 15th 2007 at 4:48pm
MrBehemoth
4 posts
Posted 2007-05-15 4:48pm
4 posts 0 snarkmarks Registered: May 14th 2007 Occupation: wannabe level designer Location: UK
Thanks guys! I wouldn't've thought of that. When triggered by another entity it behaves exactly like it's supposed to, it's only when I use ent_fire that it doesn't work.

I usually set up my entities in 2 stages: 1st I create them all and set up all their properties and test them, then I set up the interdependencies. I guess I'm going to have to rethink this strategy.

Thanks again.
Re: ambient_generic wont play on trigger Posted by Stadric on Tue May 15th 2007 at 11:18pm
Stadric
848 posts
Posted 2007-05-15 11:18pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
I like to draw a diagram if it gets too complex. With simple things I just plan it in my head.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying