Help - Triggering an ambient_generic Created 13 years ago2011-08-29 22:13:30 UTC by winds winds

Created 13 years ago2011-08-29 22:13:30 UTC by winds winds

Posted 13 years ago2011-08-29 22:13:30 UTC Post #298483
Hey guys,
I'm having trouble with what I thought would be an easy thing to do, playing a custom teleport sound when triggered. I have made a trigger_teleport brush, that should trigger an entity with the name t_tele_btm. I then made an info_teleport_destination with that name, as well as an ambient_generic with the same name. I assumed when I used this teleport, it would trigger the destination as well as the sound, yet for some reason the sound doesn't play. The only flag I put on the ambient_generic is Start Silent. I know this sound file works in cs because I used it in another mod. The volume is set to 6. Is there something I am doing wrong or another way to achieve this?
Posted 13 years ago2011-08-30 01:24:10 UTC Post #298484
Disable the start silent flag button.

Enable the not toggled flag item.. Should work then. When you test it the first time also use play everywhere.. That way you can test such things better.

Not toggled in this case just tells the ambient_generic that it is waiting to get activated by something.
Posted 13 years ago2011-08-30 06:48:06 UTC Post #298490
Thanks, but it still didn't work :(
This wav file is 22.05khz sample rate and has a bit depth of 16bit. It should be good, no?
Posted 13 years ago2011-08-30 07:36:32 UTC Post #298491
First check that it isn't your entity setup by using a standard HL sound. If that works, make sure the directory of your sound is correct. Best to have it in the sounds folder. If it still doesn't work, might be trouble with your sound file.

Make sure your ambient_generic has the Start Silent and Not Toggled flags checked. Also, not sure that teleports can trigger things other than the destination...
Jessie JessieTrans Rights <3
Posted 13 years ago2011-08-30 10:35:56 UTC Post #298498
16 bit wavs are not supported by HL, only 8 bit. ALso make sure your wav is mono, not stereo.
Posted 13 years ago2011-08-30 11:58:47 UTC Post #298503
Disable the start silent flag button.
he only wants this sound to be triggered when the teleport is activated, so you definitely want the "start silent" flag to be checked, unless i'm missing something.

Make sure the sound is a 8-bit mono wave like atom said, and if that doesn't work also:

-try the compiling with "Not Toggled" off and on. it's been a while, but i remember this flag being a pain in the arse.

-add a cue point to the track using goldwave or whatever audio file editor. THEN, use a mm to trigger the sound on/off for a prescribed period of time. This is the way i did the special effect sounds in Rooms Half-Life. E.g.:

Multimanager trigger_teleport_sound:
0.01 teleport_sound
2.0 teleport_sound

this way, evertime you call the "trigger_teleport_sound" MM, your custom sound will play for 2 seconds and shut off. This method is also very helpful if you're calling the sound multiple times, and the timing is crucial.
Captain Terror Captain Terrorwhen a man loves a woman
Posted 13 years ago2011-08-30 13:53:12 UTC Post #298504
Thanks guys!
I'm at work so I won't be able to test this until I get home.

@Captain Terror: Thanks! I tried last night having the trigger_teleport targeting a multi manager that triggered the ambient generic at 0.1 seconds. Though I only had Start Off checked and not Not Toggled. However this set up made it play at the start of ever round (for some reason?) and not when I used the teleport. I'll try again tonight with Not Toggled checked as well.
Also for the multi manager triggering the sound a second time, what is that for? To turn the ambient generic off so to speak ? So for example if my sound file is 1.8 seconds long, and I have it turn on in 0.1 seconds, should I then have it trigger off at 1.9 seconds by the mm again? Thanks again!
Posted 13 years ago2011-08-30 14:27:33 UTC Post #298505
correct! the reason we are shutting it on and off is to have more control of how the sound is called upon. Also, sounds for Half-Life that have a cue point added will run forever and ever unless triggered off.

If the mm triggering on/off works without editing your sound, fine, but if it doesn't, here is how to add a cue point using goldwave:

1. Download free version of goldwave, here
2. open sound in goldwave. go edit/cue points/edit cue points
3. click "new", then "at start", give the cue a name and click "ok".
4. save and exit
Captain Terror Captain Terrorwhen a man loves a woman
Posted 13 years ago2011-08-30 21:54:35 UTC Post #298519
@Captain Terror: You don't need a cue point in the audio. Unless it's a sound you want to play in a loop forever..

With the not toggled flag you can call in the sound as often as you want. If it doesnt have a cue point it wont loop however.

That's at least the experience I made. Start silent is only useful if you play the sound instantaneously like a looped alert sound but want it first hearable when you target it. In the end the outcome is the same. So I don't really understand the logic behind it valve saw there but whatever.
Posted 13 years ago2011-08-31 00:53:57 UTC Post #298525
Shoot, i'm really having bad luck with this :(.

I had 0 luck with making the trigger_teleport try to trigger the multi managers and play the sound. I then switched to making a trigger_multiple around the trigger_teleport which triggered a multi manager, that triggered the sound at 0.1 seconds and again at 2.0 seconds (the sound file is 2.0 seconds long). When I have start off and not triggered flags on, the sound file plays twice in a row for some reason and I can't activate it again for at least 5 seconds or so. If I turn off Not triggered, it plays once but I again can't trigger it again for about 5 seconds or so. If I mess with the times like trigger the sound at 0.1 seconds then again at 1.5 seconds, it plays twice but just overlapping (or cuts it off and plays again). If i put it to 0.1 seconds and 2.1 seconds, it plays once but I still can't activate it again for about 5 seconds. :(
Posted 13 years ago2011-08-31 09:45:03 UTC Post #298533
Trigger it once with Not Toggled checked. That should be all you need.

As for the teleporting & triggering... I might have to whip up a test map for myself. If only I still mapped regularly...

EDIT: Tested it. Frankly, I'm not sure about this one.
Jessie JessieTrans Rights <3
Posted 13 years ago2011-08-31 21:10:27 UTC Post #298554
Feel free to upload a testmap and I will look into it along with your sound.
Posted 13 years ago2011-09-05 03:36:56 UTC Post #298652
Thanks guys,
I finally got it how I wanted. What I did was make a trigger_multiple around the trigger_teleport, which targeted a multi manager that triggered the sound with Not Toggled and Start Off checked. The trigger_multiple I also had to change the delay before reset to 0.1. Also at first I noticed the sound would play most of the time, but sometimes it wouldn't. I then realized I had the trigger multiple too small, it was only 1 unit larger than the trigger teleport so if I ran through it fast, for some reason it wouldn't recognize that I hit the trigger multiple, and only recognize my teleport. So I made it slightly bigger by making it 4 units bigger from all sides, and now it works perfect.
Thanks for your help guys!
Posted 13 years ago2011-09-05 05:22:51 UTC Post #298656
Ha! What a dynamic/unique way to trigger things! I can think of al sorts of things to use that for... =p

Glad you sorted it. =)
Captain Terror Captain Terrorwhen a man loves a woman
Posted 13 years ago2011-09-05 06:26:26 UTC Post #298659
Glad he sorted it too, but you're permabanned captain terror :o
Posted 13 years ago2011-09-05 06:43:57 UTC Post #298660
o noes!! :o
Captain Terror Captain Terrorwhen a man loves a woman
Posted 13 years ago2011-09-05 07:14:28 UTC Post #298661
Question:

What compression methods can HL read?

I have compressed a Wav file using Windows Media Audio V2 (DivX WMA V2)
| 32kbps | 22KHz | stereo

And the game wont read the file.
Stojke StojkeUnreal
Posted 13 years ago2011-09-05 07:35:44 UTC Post #298662
You might try extracting the ones out of HL and seeing what format they are in.

I think it only supports some low quality .wav of some kind.
TheGrimReafer TheGrimReaferADMININATOR
Posted 13 years ago2011-09-05 08:58:20 UTC Post #298663
16bit Mono Wave files at 8000 hertz.

And use a program called dBpoweramp music converter, it's not free, but I believe you can still use it after the trial period (or something like that)
Posted 13 years ago2011-09-05 12:25:54 UTC Post #298666
you can use Audacity program
and thanks for details IanPArr.
Posted 13 years ago2011-09-05 14:35:24 UTC Post #298669
The sound I used actually was still able to play at 44.1khz, however I think I had to use an 8-bit depth if I recall correctly. If not then 16bit. Make sure it's mono though.
Posted 13 years ago2011-09-05 17:38:33 UTC Post #298673
I am using that program Lanpar. But the compression seems to be Windows media audio. But still, makes good quality wavs with extremely small size.
Stojke StojkeUnreal
You must be logged in to post a response.