Triggering a Sound Once only Created 21 years ago2003-12-15 15:31:33 UTC by rIKmAN rIKmAN

Created 21 years ago2003-12-15 15:31:33 UTC by rIKmAN rIKmAN

Posted 21 years ago2003-12-15 15:31:33 UTC Post #7877
I need to trigger a sound to be played once and once only.
I setup a brish and tied it to a trigger_once, then set the trigger to KillTrigger itself after it is setoff.
However the sound starts playing again as it is still triggered somehow.

Anyone got any ideas?

Thanks..
Posted 21 years ago2003-12-15 15:44:36 UTC Post #7878
Does it start playing again? Or just endlessly loop?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-15 16:15:48 UTC Post #7883
It starts playing again.
I`m thinking this is because the trigger_once entity fires every time you are in the brush area, but it fires againj regardless of whether I`m in the brush area or whether I KillTarget the actual brush area entity itself.

I have played with the flags, if I try to make them Not Loop or Start Silent they sound doesn`t play at all.
Posted 21 years ago2003-12-15 16:17:13 UTC Post #7884
Isn`t there a simple entity that will fire a target once and thats it.
Posted 21 years ago2003-12-15 16:22:25 UTC Post #7886
Sorry, what I meant to say above was that no matter what I set the flaghs to, it still keeps playing, I`m guessing because the trigger_once keeps triggering it.
Posted 21 years ago2003-12-15 16:26:07 UTC Post #7889
yep, ambient_generic...

with the 'start off' and 'Is not looped' flags checked
Posted 21 years ago2003-12-15 16:36:34 UTC Post #7890
Yep I`ve tried that, no matter what the sound starts playing again, even if I move out of the trigger zone.
I also tried moving back into it to check it hadn`t been set to "toggle" for some reason, but no luck.

They just keep playing.
Posted 21 years ago2003-12-15 16:55:35 UTC Post #7891
Does it loop endlessly? Is there a pause? If there's a pause, is there silence at the beginning or end of the sound file itself?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-15 17:02:48 UTC Post #7893
I`m not sure how technical you want me to get, but the sound plays for 20secs till it ends, then there is a silence, then it plays again, 1sec silence, fires again etc
Posted 21 years ago2003-12-15 17:16:47 UTC Post #7895
Is the one second silence at either end of the wave file, or is it HL retriggering it after a slight delay?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-15 17:36:23 UTC Post #7896
I`ve4 just checked and it seems the file is actually looping.
I cut the silence from the file and it just straight back into the speech with no gap, so I guess its still looping.

I have the Not Toggled and Silent Start flags checked in the ambient_generic properties.
Posted 21 years ago2003-12-15 17:53:29 UTC Post #7897
What have you recorded the sound in? Was it you who had in Sound Forge?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-15 17:58:20 UTC Post #7898
Yep.

I`ve tried using a sound saved and unedited, and tried once editing the file - both loop in the game :(

Both are saved as 11025, 8bit, mono files.

<wait>

I just tested a sound that came with half life and it worked - so its something to do with the way I`m saving my files - any ideas?
Posted 21 years ago2003-12-15 18:02:36 UTC Post #7899
In SoundForge in the wav properties, the Loop parameter is set to "One Shot" so I presume it isn`t set as a looping file.
Posted 21 years ago2003-12-15 18:20:48 UTC Post #7900
What alternatives are there in 'Forge?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-15 18:27:49 UTC Post #7901
Precise information about the ambient_generic flags you'll find there:

http://www.game-edit.org/tutorials/halflife/generic/ambient/ambient_generic.shtml

.:Buster
Posted 21 years ago2003-12-15 19:19:05 UTC Post #7904
Sometimes, sound info, such as mouth movements and loops get coded into the wav header... just remembered that one
Posted 21 years ago2003-12-15 21:17:59 UTC Post #7908
WOOHOO!
Solved it :)

SoundForge was setting a "region" by default, I removed this and now the sounds work as expected.

Thanks again for all your help :)
Posted 21 years ago2003-12-16 09:15:14 UTC Post #7954
Yep, header coded sound flags ;)
Posted 21 years ago2003-12-16 19:23:10 UTC Post #8011
another sort of related question i want to tag on at the end here, can ambients be triggered to start and then triggered to stop later, even with the looping settings?
Posted 21 years ago2003-12-17 03:50:18 UTC Post #8025
I guess you could killtarget them even if not?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-17 16:06:31 UTC Post #8117
Sometimes kiltargeting does not work, and the sound stays there untill the map is reloaded, (usually if you save and then load it)

its a bit buggy
Posted 21 years ago2003-12-17 16:08:36 UTC Post #8118
Yeah, similar things happen with sound on multiplayer maps.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 21 years ago2003-12-17 16:15:48 UTC Post #8122
Yep, doors do ths too sometimes
Posted 19 years ago2005-03-09 03:58:47 UTC Post #95990
Halflife will ALWAYS loop a wav with a cue in it.
Posted 19 years ago2005-03-09 04:40:56 UTC Post #95993
With a cue in at any point? If so, you're forgiven for resurrecting this olde poste.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-03-09 05:15:54 UTC Post #96001
K, just tested it.

If you put one cue point at the beginning, it will loop contiuously, no problem.

But, If you put the cue point someplace else, say in the middle of the track, it will play the entire thing first, then loop only from the cue to the end.
Posted 19 years ago2005-03-09 09:37:38 UTC Post #96019
Huh? I think I'll stick with the basic properties of the ambient_generic. :zonked:
Unbreakable UnbreakableWindows 7.9 Rating!
Posted 19 years ago2005-03-09 20:28:03 UTC Post #96077
The whole point is that if your .wav has any cue points, it will loop continously, regardless of the 'not toggled' flag.
Posted 19 years ago2005-03-09 20:49:51 UTC Post #96082
To stop and start a looping sound, set the "not toggled" flag off and the "starts silent" flag on. Then target the sound once to turn it on, then target it again to turn it off. Repeat as often as you'd like.
Posted 19 years ago2005-03-10 02:06:50 UTC Post #96105
Yup, another way to do it, with triggers.
You must be logged in to post a response.