View Single Post
Old
  (#2)
Crizz is Offline
Member
 
Posts: 52
Join Date: Sep 2002
Location: Vienna, Austria
   
Default 10-13-2002, 06:15 AM

I´ve some ambient sounds in DesertBase_final / sandstorm!

I have placed a soundspeaker next to the radio and targeted it to a trigger multiple all (inside the entire room) So when you spawn in that room or enter the room you trigger the radio.

Then enter this in your .scr file (these lines are directly from my .scr file (radio_1 = targetname for your speaker):

level waittill spawn

thread sound_fx

-----------------------

sound_fx:

thread radio_1
thread radio_2

end


radio_1:

$radio_1 waittill trigger
$radio_1 loopsound m2l2b_radio1

end

radio_2:

$radio_2 waittill trigger
$radio_2 loopsound m2l2a_radio2

end

If you don´t hear a radio sound then use an Ubersound.scr that allows all sounds in all gamemodes! BUT use only one in your main folder (beware of hidden Ubersound files in custom maps) -> More than one modified Ubersound.scr in your Main folder will mess up the sounds again!!

There may be other ways to include ambient sounds, but I found this an easy way and it will play the sound only when you enter a trigger field. So it´s more CPU friendly.
You could even break up the loop and let the trigger check again if you´re near the radio before playing a loop again. The CPU will say thank you ;-)

radio_1:

$radio_1 waittill trigger
$radio_1 loopsound m2l2b_radio1
wait 5
$radio_1 stoploopsound
wait 1
goto radio_1

end

sound will play 5 secs, stop for one sec, check the trigger and starts again if you´re inside the trigger. If not it will be silent!
Works great for crickets, some radio sounds. Not so good for machine sound loops etc. as minimum is 0.1 sec for the wait time.

Crizz
  
Reply With Quote