ambient sound ?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

ambient sound ?

Post 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?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

nope

Post 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.
Tom Trude,

Image
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

i swear tl, that image must be in your family album .
i'm not f****** angry, i'm from philadelphia .
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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-)
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

ambient

Post by tltrude »

So, he would have to remove this line?

exec global/ambient.scr nameofmymusfile
Tom Trude,

Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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
Post Reply