PDA

View Full Version : Problem with sound and water entry



legacy-Dolgoprudensky
07-12-2003, 08:30 PM
I have a water volumn with a fluid surface info that extends through three rooms. I have not been able to get the entry / exit sounds to work. I have compared to working examples and have been unable to find any difference that will make mine work. Help! What have I missed?

legacy-Doctor7
07-13-2003, 07:14 AM
From what I could tell, the entry and exit sound settings don't do anything except remove the default sounds. Leave them blank and you should get the defaults.

legacy-Mr Evil
07-13-2003, 08:26 AM
Entry/exit actors/sounds for water volumes are buggered. I made a new water volume some time ago that fixes both, and it looks like this:

//================================================== ===========================
// NBWaterVolume - Fixes EntryActor spawning at volume location instead of
// splashing actor's location.
// http://come.to/MrEvil
//================================================== ===========================
class NBWaterVolume extends PhysicsVolume;

function PlayEntrySplash(Actor Other)
{
local float SplashSize;
local actor splash;

splashSize = FClamp(0.00003 * Other.Mass * (250 - 0.5 * FMax(-600,Other.Velocity.Z)), 0.1, 1.0 );

if(EntrySound != None)
{
Other.PlaySound(EntrySound, SLOT_Interact, splashSize);
if(Other.Instigator != None)
MakeNoise(SplashSize);
}

if(EntryActor != None)
{
splash = Spawn(EntryActor,,, Other.Location);

if (splash != None)
splash.SetDrawScale(splashSize);
}
}

function PlayExitSplash(Actor Other)
{
local float SplashSize;
local actor splash;

splashSize = FClamp(0.003 * Other.Mass, 0.1, 1.0 );

if(ExitSound != None)
Other.PlaySound(ExitSound, SLOT_Interact, splashSize);

if(ExitActor != None)
{
splash = Spawn(ExitActor,,, Other.Location);

if(splash != None)
splash.SetDrawScale(splashSize);
}
}

defaultproperties
{
TerminalVelocity=1000.000000
FluidFriction=5.000000
bWaterVolume=True
}