In the pawns PlayDyingSound function I want to replace the default sounds with the controllers class “I’m hit” voice message sound.
So that players will just shout “I’m hit” when they die.
How do you ask the controller for the proper class sound name? So it can be played by the Pawn.
Code from Pawn class
So that players will just shout “I’m hit” when they die.
How do you ask the controller for the proper class sound name? So it can be played by the Pawn.
Code from Pawn class
Code:
function PlayDyingSound()
{
local name ImHit;
// Dont play dying sound if a skeleton. Tricky without vocal chords.
if ( bSkeletized )
return;
if ( bGibbed )
{
PlaySound(GibGroupClass.static.GibSound(), SLOT_Pain,3.5*TransientSoundVolume,true,500);
return;
}
if ( HeadVolume.bWaterVolume )
{
PlaySound(GetSound(EST_Drown), SLOT_Pain,2.5*TransientSoundVolume,true,500);
return;
}
//removed the default sounds
//PlaySound(SoundGroupClass.static.GetDeathSound(), SLOT_Pain,2.5*TransientSoundVolume, true,500);
//now what should go here???
}
}