Talk:Specimen Mechanics: Difference between revisions
Jump to navigation
Jump to search
Scaryghost (talk | contribs) (Copied code for bleed out and decapitation) |
Scaryghost (talk | contribs) (Added stunning code) |
||
Line 1: | Line 1: | ||
== Decapitation | == Decapitation == | ||
Decapitation damage bonus and bleed out timer: KFMonster.RemoveHead() | Decapitation damage bonus and bleed out timer: KFMonster.RemoveHead() [KFMonster.uc]. | ||
// Head explodes, causing additional hurty. | // Head explodes, causing additional hurty. | ||
Line 13: | Line 13: | ||
} | } | ||
BleedOutTime usage: KFMonster.Tick() | BleedOutTime usage: KFMonster.Tick() [KMonster.uc]. | ||
// If the Zed has been bleeding long enough, make it die | // If the Zed has been bleeding long enough, make it die | ||
if ( Role == ROLE_Authority && bDecapitated ) | if ( Role == ROLE_Authority && bDecapitated ) | ||
Line 27: | Line 27: | ||
--[[User:Scaryghost|Scaryghost]] 00:46, 24 March 2012 (EDT) | --[[User:Scaryghost|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; | |||
} |
Revision as of 05:10, 24 March 2012
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; }