Random skies AND random sounds?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Random skies AND random sounds?

Post by THEWULFMAN »

I am stuck :? I am making a random weather version of kamino, one is like the stock stormy weather, the other is a Sunny daytime version. I cant find a way to get rid of the rain sounds on the day version though. I tried this
Hidden/Spoiler:
function weather()
if WeatherMode == 1 then
ReadDataFile("dc:KAM\\sky.lvl", "day")

DeactivateRegion ("rain1")
DeactivateRegion ("rain2")
DeactivateRegion ("rain3")

SetAIViewMultiplier(1.0)
elseif WeatherMode == 2 then
ReadDataFile("dc:KAM\\sky.lvl", "storm")
SetAIViewMultiplier(0.5)
end
end
I renamed the sound regions to rain1 , 2, 3. No effect. Anyone got any ideas? I am stumped. :o
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Random skies AND random sounds?

Post by Jendo7 »

This is just a guess but might this work:

StopAudioStream

...and then add the name of the rain sound, i.e ("kam_amb_rain")
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Random skies AND random sounds?

Post by Maveritchell »

Simply add your soundregions to an empty layer that is only loaded in with the world file containing your sky/lighting for that specific environment.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Random skies AND random sounds?

Post by THEWULFMAN »

Maveritchell wrote:Simply add your soundregions to an empty layer that is only loaded in with the world file containing your sky/lighting for that specific environment.

I tried this, it worked, sorta. The sounds are gone from both for both day and stormy. I deleted the soundregion level line from the world req, while I added it to my stormy weather req.

When i tested this out on my random weather tatooine, Same thing, no sounds. I know it worked because my added damage regions worked only on the duststorm weather.

Any ideas?
Post Reply