Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Kyka

Ambient sound question. (Nub question, but this almost goes without saying. O_o)

Recommended Posts

Putting together a set of ambient sounds for my project, and all of them seem to be working except for ambient sound 2. Relevant sndinfo printed below. Any thoughts?


amb2 {sound/back1 sound/back2 sound/back3}
sound/back1 BACK1
sound/back2 BACK2
sound/back3 BACK3

$AMBIENT 2 amb2 RANDOM 30.0 35.0 4.0

Thanks people.


Also, while i think of it, I remember Enjay saying that it is possible to have more than 64 ambient sounds in a wad, but I couldn't find where this was said. Would someone mind pointing out how this is done?

Share this post


Link to post

This will probably work:

$random amb2 {sound/back1 sound/back2 sound/back3}
sound/back1 BACK1
sound/back2 BACK2
sound/back3 BACK3

$AMBIENT 2 amb2 RANDOM 30.0 35.0 4.0


The sound "amb2" needs to be told to pick randomly from the 3 defined sounds (which is what $random does). The "RANDOM" statement in the ambient definition is for how often the sound is played (random between 30.0 and 35.0 in this case).

Oh, and on the >than 64, just define them as normal, allocating ambient sound numbers just as you have done with your existing sounds. Then place an object with ednum 14065 in your map and set the first argument to be the same as the ambient number that you want to use.

Share this post


Link to post

That's one option. But if you need more than 256 you can define ambient sounds per level by defining level-specific SNDINFOs in MAPINFO.

Share this post


Link to post

I forgot about that. The most I have ever needed in a single mod has been 188 ambient sounds so I've never had the need for multiple SNDINFOs.

However, I can't find the documentation on how to do it. Has it been added to the Wiki? I've checked the MAPINFO and SNDINFO pages.

Share this post


Link to post

I haven't checked myself.

It's actually quite simple:

'sndinfo = "lumpname"'

will add a local SNDINFO to the global one when a level is played.
The same option exists for SNDSEQ.

I haven't needed it myself for the amount of ambient sounds but it's quite handy when you try to compile episodes from single level WADs that have conflicting resources.

Share this post


Link to post
Enjay said:

This will probably work:

$random amb2 {sound/back1 sound/back2 sound/back3}
sound/back1 BACK1
sound/back2 BACK2
sound/back3 BACK3

$AMBIENT 2 amb2 RANDOM 30.0 35.0 4.0


The sound "amb2" needs to be told to pick randomly from the 3 defined sounds (which is what $random does). The "RANDOM" statement in the ambient definition is for how often the sound is played (random between 30.0 and 35.0 in this case).

Sorry double post.


Thanks Enjay for this. I did this, and it actually played amb2 as a global sound, across the entire level regardless of where I was. Upon looking into this, I realised that:

$AMBIENT 2 amb2 RANDOM 30.0 35.0 4.0

should have been:

$AMBIENT 2 amb2 POINT RANDOM 30.0 35.0 4.0

Now it works perfectly.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×