Page 1 of 1

Sound for rain and fire?

Posted: Thu Apr 05, 2007 11:28 am
by Liberator
It feels strange to pass by some fire and all I hear is silence.

How do I add some fire sound?

Sencond...How do I add some Rain sound. I did det tutorial from this site. I have lighting and thundering...but I miss the sound of rain falling....isn't that possible?

Liberator :)

fire

Posted: Thu Apr 05, 2007 2:58 pm
by tltrude
Adding fire sound is very easy.

Make a speaker (script_object or script_model) for the sound, place it just above your fire, and give it a targetname. Then add this line to your script.

$fire_speaker loopsound fire_med

You can also use "fire_small" or "fire_large" as the name of the sound.

For falling rain sound you would also need a speaker (high above the ground) and use the sound name "rain_ext" or "rain_int".

Posted: Thu Apr 05, 2007 3:33 pm
by Liberator
Hi mate, yeah that looks pretty easy :)

Thanks ;)

Posted: Thu Apr 05, 2007 4:11 pm
by Liberator
Oh another Q...
Make a speaker (script_object or script_model) for the sound, place it just above your fire, and give it a targetname. Then add this line to your script.
What will be the targetname?


For falling rain sound you would also need a speaker (high above the ground) and use the sound name "rain_ext" or "rain_int".
In the script, will it be $rain_speaker instaed of $fire_speaker ?

What would be the the targetname for the rain then?

targetname

Posted: Thu Apr 05, 2007 8:00 pm
by tltrude
In my example the targetname of the speaker entity is "fire_speaker". You give it a targetname by highlighting it and hitting key N.

Key: targetname
Value: fire_speaker

But, you can use any name you wish, as long as you use the same name in the script ($fire_speaker).

Here is an example map that has speakers above the river. They have vis_leafgroup brushes around them, but you can just move them out of the way ( or filter out vis ) to see the script_object speakers.

Tutorial Map: mp_ambient2
Image


There is also a speaker high above the map for ambient sound -- like where your rain speaker would be. The rain sound named "rain_ext" has a range of 6000 units in all directions.

By the way, you can copy anything you like from that map -- including the speakers.

Posted: Thu Apr 05, 2007 10:07 pm
by Liberator
Hi tltrude,

Thanks for the tutorial :)

So to create a sound I use script_object and put targetname and classname into it?

In the .scr I see this :

wait 1
$outside_speaker1 loopsound outside_snd
$outside_speaker2 loopsound river_snd
$outside_speaker3 loopsound river_snd
$outside_speaker4 loopsound river_snd


Those outside speakers are linked to these strings. Where did you find river_snd ?
I looked in Ubersound and found river under ambient, but the _snd wasn't included.

Posted: Fri Apr 06, 2007 9:55 pm
by tltrude
Look at the top of the script. I used new alias names because I modified the original ubersound lines. This is called an ubersound workaround.

local.master = spawn ScriptMaster
local.master aliascache outside_snd sound/amb_stereo/Amb_M4_CountryExt_02.mp3 soundparms 1.0 0.0 1.0 0.0 5000 5000 "local" loaded maps "dm moh obj train"
local.master aliascache bridge_snd sound/mechanics/m6l3a_SlidingDoors_Close.wav soundparms 1.0 0.0 1.0 0.0 160 1600 item loaded maps "dm moh obj train"
local.master aliascache
river_snd sound/amb/Amb_River.wav soundparms 0.25 0.0 1.0 0.0 1024 1250 auto loaded maps "dm moh obj train"
local.master aliascache fire_snd sound/amb/Amb_FirePlace.wav soundparms 0.5 0.0 1.0 0.0 128 256 auto loaded maps "dm moh obj train"


Here is what the original "river" line looks like.

aliascache river sound/amb/Amb_River.wav soundparms 0.3 0.0 1.0 0.0 1200 10000 auto loaded maps "m4l3 dm moh obj train"

If you compare the two, you can see what I modified -- the range of 10000 was to big.

Posted: Mon Apr 09, 2007 12:50 pm
by Liberator
Ahh nice!

That gives me a better picture how to create sounds ;)

Thanks!! ;)

Posted: Sat Sep 01, 2007 2:23 pm
by Aquamarin
Real nice tut!!!
It helps me sometime...
A small question:
is it possible to fill the vis with a sound?
Like a "pseudo"-ambiente for a part of the map?
My problem is, that i like to play some music on my map, but it did not work, when i pack the mp3 in the pk3-file. My other way is to put a lot of speakers in the map, but anytime i pass a speaker the pitch is different...
From verry slow to verry high speed... - sometimes it sounds to make me laugh...
THX for your answer!

Aqua

Edit: the map ist for AA

Posted: Sun Sep 02, 2007 6:17 am
by tltrude
Here are what all the parts of an ubersound line are.

aliascache (?alias name?) snd wavfile soundparms basevol volmod basepitch pitchmod minDist maxDist channel loaded|streamed maps "mapstr1 mapstring2 mapstring3 ..."

aliascache river sound/amb/Amb_River.wav soundparms 0.3 0.0 1.0 0.0 1200 10000 auto loaded maps "m4l3 dm moh obj train"

So, changing one of those numbers will cause the pitch to be different.

Posted: Sun Sep 02, 2007 8:00 am
by Aquamarin
Yepp - but all speakers ( its a big map ) play the same sound, an all have the same line.... ( if you want - i send you the map - it sounds cracy )
BBMD Cubus ( my mapping companion ) has fixed the problem with one speaker in the middle an some skill with the distance...

Is there any other way to make a "ambiente", if i want to put the sound only in the pk3? Like vis filled with a unique sound?

pitch

Posted: Sun Sep 02, 2007 5:56 pm
by tltrude
The change in pitch was probably caused by overlapping the same sound from different speakers.

There are other tutorials for adding ambient sound. My tutorial is mostly for making the sound change when a player goes inside -- in multiplayer maps. Singleplayer maps do it using the ".mus" files found in pak0's "music" folder and triggers near the doors.

Posted: Mon Sep 03, 2007 3:05 am
by Aquamarin
Well - thats the reason.

Im maping only multiplayer. So i cant use the *mus files...
But maybe your tut helps me sometime.
Thx again.