I have made a custom impact hammer and would like it to play a sound only when the person hit with it dies from it, not because they took damage from it.
Here is my class:
I don't know how to call a sound in UT3 in this type of class when the person dies
Anyone know?
Here is my class:
Code:
class UTDmgType_WGSImpactHammer extends UTDamageType
abstract;
/** Return the DeathCameraEffect that will be played on the instigator that was caused by this damagetype and the Pawn type (e.g. robot) */
simulated static function class<UTEmitCameraEffect> GetDeathCameraEffectInstigator( UTPawn UTP )
{
// robots need to splatter oil instead of blood
if( ( UTP != none ) && ( ClassIsChildOf( UTP.GetFamilyInfo(), class'UTFamilyInfo_Liandri' ) == TRUE ) )
{
return class'UTEmitCameraEffect_OilSplatter';
}
else
{
return default.DeathCameraEffectInstigator;
}
}
defaultproperties
{
// GibPerterbation=0.500000
GibPerterbation=0.550000
DamageWeaponClass=Class'WGSweps_a2v.UTWeap_WGSImpactHammer'
DamageWeaponFireMode=2
DeathCameraEffectInstigator=Class'UTGame.UTEmitCameraEffect_BloodSplatter'
DamageCameraAnim=CameraAnim'Camera_FX.ImpactHammer.C_WP_ImpactHammer_Primary_Fire_GetHit_Shake'
KillStatsName="KILLS_IMPACTHAMMER"
DeathStatsName="DEATHS_IMPACTHAMMER"
SuicideStatsName="SUICIDES_IMPACTHAMMER"
RewardCount=10
RewardAnnouncementSwitch=5
RewardEvent="REWARD_JACKHAMMER"
CustomTauntIndex=5
DeathString="`o was hammered by `k."
FemaleSuicide="`o pounded herself."
MaleSuicide="`o pounded himself."
bAlwaysGibs=True
KDamageImpulse=10000.000000
VehicleDamageScaling=1.000000
Name="Default__UTDmgType_WGSImpactHammer"
ObjectArchetype=UTDamageType'UTGame.Default__UTDamageType'
}
I don't know how to call a sound in UT3 in this type of class when the person dies
Anyone know?
Last edited: