661Gaz pretty explained it, so this is supplemental - several ways of looking at the same thing may help out.
My code has different reactions to different weapons. The code is for my civilians - 1 hit and they go thru dying sequences according to what hit them. There are timers in use as you can see, even as 661gaz above has timers.
event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
if((damageType == class'DamageGlock')|| (damageType == class'DamageShotgun')
||(damageType == class'DamageHeadshot')||(damageType == class'DamageKnife')
||(damageType == class'DamageRocket') ||(damageType == class'DamageBB'))
{
bWounded = true;
DieFromBullets();
TheBloodEffects();
UpdateDamageMaterial();
super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
}
else if ((damageType == class'DamageBurning') ||(damageType == class'DamageNapalm'))
{
bWoundedFire = true;
SetTimer(0.5, false, nameof(TheBurnEffects));
super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
}
else if((damageType == class'DamageStun') && KCC !=none)
{
bStunned=true;
SetTimer(0.1, false, nameof(TheShockAnim));
}
else if ((damageType == class'DamageHEAL'))
{
return;
}
else
{
super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
}}
below is the way the pawn dies if hit buy the InstantHit weapons in the TakeDam list
/////////Only the effects played by the pawn after it's hit
simulated function TheBloodEffects()
{
local vector BurnsLoc;
if(bIsFem && !bIsMale && Health > 0)
{
PlaySound(CivFemScream, false, true, true, vect(0,0,0), false);
}
else if(bIsMale && !bIsFem)
{
PlaySound(CivMaleScream, false, true, true, vect(0,0,0), false);
}
else
{
return;
}
if(bIsMale || bIsFem)
{
BloodPSC = Spawn(class'EmitKFZBloodA',,,BurnsLoc);
Mesh.GetSocketWorldLocationAndRotation(BurnSocketA, BurnsLoc,);
BloodPSC.SetBase(self, , self.Mesh, BurnSocketA);
BloodPSC.SetTemplate(ParticleSystem'KFTex6_effects.Particles.BloodFromWound');
}
else
{
return;
}
}
And also from TakeDamage
simulated function DieFromBullets()
{
if(Health > 0 && FullBodyAnimSlot != None )
{
FullBodyAnimSlot.PlayCustomAnim(ShotWoundedAnims[Rand(3)], 0.8, 0.5, 0.5, TRUE, TRUE); ///the chosen 'ShotWoundedAnims' is repeated until the pawn dies
SetTimer(5.0 + FRand() * 5.0, false, 'Suicide');
}
}
Move the bot on to the final death. The burn hits end in the same place, Suicide()
/////////Finally and as says, suicide is the best option
function Suicide()
{
super.Suicide();
}
Hope it’s of some use.