// Code originally was taken from Scary Ghost's Super Zombies mutator class ZombieGorefast_GRITTIER extends ZombieGorefast; #exec OBJ LOAD FILE=ScrnZedPack_T.utx var float minRageDist; function TakeDamage(int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector momentum, class DamType, optional int HitIndex) { if (InstigatedBy == none || class(DamType) == none) Super(Monster).TakeDamage(Damage, instigatedBy, hitLocation, momentum, DamType); // skip NONE-reference error else Super(KFMonster).TakeDamage(Damage, instigatedBy, hitLocation, momentum, DamType); } function RangedAttack(Actor A) { Super(KFMonster).RangedAttack(A); if( !bShotAnim && !bDecapitated && VSize(A.Location-Location)<=minRageDist ) GoToState('RunningState'); } state RunningState { // Don't override speed in this state function bool CanSpeedAdjust() { return super.CanSpeedAdjust(); } function BeginState() { super.BeginState(); } function EndState() { super.EndState(); } function RemoveHead() { super.RemoveHead(); } function RangedAttack(Actor A) { if ( bShotAnim || Physics == PHYS_Swimming) return; else if ( CanAttack(A) ) { bShotAnim = true; //Always do the charging melee attack SetAnimAction('ClawAndMove'); RunAttackTimeout = GetAnimDuration('GoreAttack1', 1.0); return; } } simulated function Tick(float DeltaTime) { super.Tick(DeltaTime); } Begin: GoTo('CheckCharge'); CheckCharge: if( Controller!=None && Controller.Target!=None && VSize(Controller.Target.Location-Location)