Page 1 of 1

Multiple soundstreams?

Posted: Sun Apr 06, 2014 8:19 pm
by LRKfm946
My map has 4 different areas with unique environments in each. I'd like to have unique ambient sounds for each area. Is it possible to have soundstream regions overlapping and still work correctly? I remember reading somewhere that it might not be, but I want to make sure.

If not, what would my solution be?

Re: Multiple soundstreams?

Posted: Sun Apr 06, 2014 8:57 pm
by Marth8880
Yup, totally possible. Just have two instances of your OpenAudioStream line in your LUA like so:

Code: Select all

	OpenAudioStream("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_s_COR_Streaming.lvl",  "cor1")
	OpenAudioStream("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_s_COR_Streaming.lvl",  "cor1")
Fun fact: I figured this out only a few days ago when I was playing around with sound streams in my Pioneer Trails map. :o

Re: Multiple soundstreams?

Posted: Wed Apr 09, 2014 11:37 am
by LRKfm946
Awesome, thanks!

If only I could get my sounds to work in the first place :(

EDIT: In my map I have random sky effects (normal, night, and rain) and I'm trying to disable the rain stream for the other two skies like so:

Code: Select all

function weather()
	WeatherMode = math.ceil(GetRandomNumber()*3)
	if WeatherMode == 2 then 
		ReadDataFile("dc:HGS\\HGS_sky.lvl", "rain")
	elseif WeatherMode == 3 then 
		ReadDataFile("dc:HGS\\HGS_sky.lvl", "night")
		DeactivateRegion("GlobalAmb_rain")
	else
		ReadDataFile("dc:HGS\\HGS_sky.lvl", "norm")
		DeactivateRegion("GlobalAmb_rain")
	end
end
Whenever I load the map, the rain sounds aren't disabled, and I get this error:

Code: Select all

Message Severity: 2
.\Source\ActiveRegion.cpp(186)
Region "GlobalAmb_rain" not found
I tried moving the stream to the conquest layer and changing its name, but that didn't work. Any suggestions?

Re: Multiple soundstreams?

Posted: Wed Apr 09, 2014 11:41 am
by Marth8880
Easy. Just put each soundstream region in its respective weather variation's layer. ;)

Re: Multiple soundstreams?

Posted: Wed Apr 09, 2014 3:58 pm
by LRKfm946
Marth8880 wrote:Easy. Just put each soundstream region in its respective weather variation's layer. ;)
I don't have a world layer for each weather mode, I'm using sky lvls instead (I did this: viewtopic.php?f=27&t=18429)
I have one soundstream region for the rain currently located in the conquest layer of the world. It was originally in the SoundStream layer but I thought moving it might work.

I should add that several other regions are giving me trouble, including damage regions and rainshadow regions. I tried activating the damage region via lua and said region not found again. All of the rainshadow regions are grouped together, and some of them work, some don't.

(I just looked at some stock map files for reference and all the rainshadow region types are RainShadow1, RainShadow2, etc. instead of just rainshadow. I also left out the scale parameters of the damage region, but I don't think that would cause the region not to be loaded or whatever. I'll try those fixes and report back later on it.)

Re: Multiple soundstreams?

Posted: Wed Apr 09, 2014 5:36 pm
by yuke5
Marth8880 wrote:Yup, totally possible. Just have two instances of your OpenAudioStream line in your LUA like so:

Code: Select all

	OpenAudioStream("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_s_COR_Streaming.lvl",  "cor1")
	OpenAudioStream("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_s_COR_Streaming.lvl",  "cor1")
Fun fact: I figured this out only a few days ago when I was playing around with sound streams in my Pioneer Trails map. :o
Awww man. This would have been so useful for Skyline. Oh well. I can still use it for Kashyyyk: Village!

Re: Multiple soundstreams?

Posted: Wed Apr 09, 2014 6:47 pm
by AQT
LRKfm946 wrote:
Marth8880 wrote:Easy. Just put each soundstream region in its respective weather variation's layer. ;)
I don't have a world layer for each weather mode, I'm using sky lvls instead (I did this: viewtopic.php?f=27&t=18429)
I have one soundstream region for the rain currently located in the conquest layer of the world. It was originally in the SoundStream layer but I thought moving it might work.
You'll need to create and utilize those layers, in addition to using sky .lvl files. This explanation here might help: viewtopic.php?p=447781#p447781