Talk:Specimen Mechanics
Decapitation
Decapitation damage bonus and bleed out timer: KFMonster.RemoveHead() [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() [KMonster.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)
Stunning
Damage requirement for stunning: KFMonster.PlayHit() [KFMonster.uc]
if( Health>0 && Damage>(float(Default.Health)/1.5) ) FlipOver();
FlipOver's actions: KFMonster.FlipOver() [KFMonster.uc] // High damage was taken, make em fall over.
function bool FlipOver() { if( Physics==PHYS_Falling ) { SetPhysics(PHYS_Walking); } bShotAnim = true; SetAnimAction('KnockDown'); Acceleration = vect(0, 0, 0); Velocity.X = 0; Velocity.Y = 0; Controller.GoToState('WaitForAnim'); KFMonsterController(Controller).bUseFreezeHack = True; Return True; }