This member has provided no bio about themself...
Posted by Daemonion on Jun 7th, 2012
I'm on a roll with these space restrictors.
I thought it would be neat to have the player's indoor location reflect the weather, as well. In vanilla, when it is raining and you had a mesh (a tree, a roof, etc) overhead, the volume of the sound goes down a bit to try and reflect that you have something over your head. Pretty neat, but I wanted to take it a bit further using my ambient white noise idea.
Now, when the player is either inside or outside of a space restrictor (there will be space restrictors in essentially every building now), I wrote some new code that checks to see if it is raining. If it is raining, the actor will be assigned an infoportion and some new audio will trigger based on their location. Here is the code I edited in sound_theme.script, and here is an example of the new space restrictor logic.
The whole point of implementing location-based ambient white noise is to make the player feel more immersed in their surroundings. Now, I can reflect that with rain, too :)
So, say the player is inside a house while the sun is out. He'll hear the creaking of the wooden frame, maybe a rat scurrying about. Shit like that. Once it starts to rain, though, that ambient sound track will be replaced by one to reflect the rain drops hitting the roof, maybe some water dripping inside, etc etc. There will be different tracks for underground areas, for attics, for basements, for regular house-type buildings, for larger warehouses ...lots of options.