Re: ambient_generic wont play on trigger
Posted by MrBehemoth on
Mon May 14th 2007 at 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 MrBehemoth on
Tue May 15th 2007 at 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 MrBehemoth on
Tue May 15th 2007 at 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.