Page 1 of 1

ambient sound ?

Posted: Thu Mar 08, 2007 2:10 am
by ViPER
I would like to be able to use a cvar to switch my map ambient sound to run 2 ways.

1 looped and

2 once


I could script it with the same sound named two different ways - and two seperate mus files basically for what is the same sound.

Any way I could do this without duplicating my sound file twice?

nope

Posted: Thu Mar 08, 2007 4:45 am
by tltrude
In single player you can have stuff like this.

!normal volume 1.5
!normal loop

!aux1 volume 1.5
!aux1 loop

!aux2 volume 1.5
!aux2 loop

But, for multiplayer they only have "normal". However, there is a way around that. Check out my ambient sound tutorial map.

mp_ambient2
Image


The tiny vis_leafgroups hide the outside speakers. So, you could have one set of speakers for loopsound, and one set for playsound.

Posted: Thu Mar 08, 2007 2:51 pm
by PKM
i swear tl, that image must be in your family album .

Posted: Thu Mar 08, 2007 5:26 pm
by jv_map
It can, in fact, be done easier :)

You can use aux1 to aux8 in mp too, make a .mus file like this:

normal somemp3.mp3
!normal volume 1.0
!normal loop

aux1 somemp3.mp3
!aux1 volume 1.0

Then in your script type, before level waittill prespawn:

soundtrack music/nameofmymusicfile.mus

Later on, you can use
forcemusic normal normal

to play a looped sound, or
forcemusic aux1 aux1

to play the sound just 1 time.

8-)

ambient

Posted: Thu Mar 08, 2007 9:25 pm
by tltrude
So, he would have to remove this line?

exec global/ambient.scr nameofmymusfile

Posted: Sat Mar 10, 2007 8:24 am
by ViPER
thank you.

at end of not looped it defaults back to normal.

but i thought you had to name the mus same as the mp3. you dont i discovered so i made multiple mus files and exec ambients with a switch