Talk:Specimen Mechanics
Decapitation Code
Decapitation damage bonus and bleed out timer: KFMonster.RemoveHead() in KFMonster.uc.
// Head explodes, causing additional hurty. if( KFPawn(LastDamagedBy)!=None ) { TakeDamage( LastDamageAmount + 0.25 * HealthMax , LastDamagedBy, LastHitLocation, LastMomentum, LastDamagedByType); } if( Health > 0 ) { BleedOutTime = Level.TimeSeconds + BleedOutDuration; }
BleedOutTime usage: KFMonster.Tick() in KFMonster.uc.
// If the Zed has been bleeding long enough, make it die if ( Role == ROLE_Authority && bDecapitated ) { if ( BleedOutTime > 0 && Level.TimeSeconds - BleedOutTime >= 0 ) { Died(LastDamagedBy.Controller,class'DamTypeBleedOut',Location); BleedOutTime=0; } }
BleedOutDuration is set to 5 in KFMonster.uc, 6 in ZombieBloatBase.uc, ZombieHuskBase.uc, and ZombieScrakeBase.uc, and 7 in ZombieFleshpoundBase.uc
--Scaryghost 00:46, 24 March 2012 (EDT)