rott/kf_sources/KFOldSchoolZeds/Classes/ZombieCrawlerOS.uc
2026-07-14 20:27:09 +07:00

147 lines
4.3 KiB
Ucode

class ZombieCrawlerOS extends KFMonsterOS;
var() float PounceSpeed;
var bool bPouncing;
simulated function ZombieCrispUp()
{
super.ZombieCrispUp();
Skins[1]=default.Skins[1];
}
function bool DoPounce()
{
if ( bZapped || bIsCrouched || bWantsToCrouch || (Physics != PHYS_Walking) || VSize(Location - Controller.Target.Location) > (MeleeRange * 5) )
return false;
Velocity = Normal(Controller.Target.Location-Location)*PounceSpeed;
Velocity.Z = JumpZ;
SetPhysics(PHYS_Falling);
ZombieSpringAnim();
bPouncing=true;
return true;
}
simulated function ZombieSpringAnim()
{
SetAnimAction('ZombieSpring');
}
event Landed(vector HitNormal)
{
bPouncing=false;
super.Landed(HitNormal);
}
event Bump(actor Other)
{
if(bPouncing && KFHumanPawn(Other)!=none )
{
KFHumanPawn(Other).TakeDamage(((MeleeDamage - (MeleeDamage * 0.05)) + (MeleeDamage * (FRand() * 0.1))), self ,self.Location,self.velocity, class 'KFmod.ZombieMeleeDamage');
if (KFHumanPawn(Other).Health <=0)
KFHumanPawn(Other).SpawnGibs(self.rotation, 1);
bPouncing=false;
}
}
simulated event SetAnimAction(name NewAction)
{
super.SetAnimAction(NewAction);
if ( AnimAction == 'ZombieLeapAttack' || AnimAction == 'LeapAttack3' || AnimAction == 'ZombieLeapAttack')
{
AnimBlendParams(1, 1.0, 0.0,, 'Bip01 Spine1');
PlayAnim(NewAction,, 0.0, 1);
}
}
function bool FlipOver()
{
return false;
}
static simulated function PreCacheMaterials(LevelInfo myLevel)
{
myLevel.AddPrecacheMaterial(Texture'KFOldSchoolZeds_Textures.Crawler.CrawlerSkin');
myLevel.AddPrecacheMaterial(FinalBlend'KFOldSchoolZeds_Textures.Crawler.CrawlerHairFB');
}
defaultproperties
{
PounceSpeed=330.000000
MeleeAnims(0)="ZombieLeapAttack"
MeleeAnims(1)="ZombieLeapAttack"
MeleeAnims(2)="LeapAttack3"
HitAnims(0)=
HitAnims(1)=
HitAnims(2)=
MoanVoice=SoundGroup'KFOldSchoolZeds_Sounds.Crawler.Crawler_Speech'
KFHitFront=
KFHitBack=
KFHitLeft=
KFHitRight=
bStunImmune=True
bCannibal=True
ZombieFlag=2
MeleeDamage=6
damageForce=5000
KFRagdollName="CrawlerRag"
JumpSound=Sound'KFOldSchoolZeds_Sounds.Shared.Male_ZombieJump'
CrispUpThreshhold=10
Intelligence=BRAINS_Mammal
OnlineHeadshotOffset=(X=20.000000,Y=-5.000000,Z=-7.000000)
OnlineHeadshotScale=1.100000
MotionDetectorThreat=0.340000
HitSound(0)=SoundGroup'KFOldSchoolZeds_Sounds.Shared.Male_ZombiePain'
DeathSound(0)=SoundGroup'KFOldSchoolZeds_Sounds.Shared.Male_ZombieDeath'
ScoringValue=10
IdleHeavyAnim="ZombieLeapIdle"
IdleRifleAnim="ZombieLeapIdle"
bCrawler=True
GroundSpeed=140.000000
WaterSpeed=130.000000
JumpZ=350.000000
HealthMax=70.000000
Health=70
HeadRadius=10.000000
HeadHeight=1.000000
MenuName="Crawler 2.5"
ControllerClass=Class'KFOldSchoolZeds.ControllerCrawlerOS'
bDoTorsoTwist=False
MovementAnims(0)="ZombieScuttle"
MovementAnims(1)="ZombieScuttle"
MovementAnims(2)="ZombieScuttle"
MovementAnims(3)="ZombieScuttle"
TurnLeftAnim="ZombieScuttle"
TurnRightAnim="ZombieScuttle"
WalkAnims(0)="ZombieLeap"
WalkAnims(1)="ZombieLeap"
WalkAnims(2)="ZombieLeap"
WalkAnims(3)="ZombieLeap"
AirAnims(0)="ZombieSpring"
AirAnims(3)="ZombieSpring"
TakeoffAnims(0)="ZombieSpring"
TakeoffAnims(1)="ZombieSpring"
TakeoffAnims(2)="ZombieSpring"
TakeoffAnims(3)="ZombieSpring"
LandAnims(0)="ZombieScuttle"
LandAnims(1)="ZombieScuttle"
LandAnims(2)="ZombieScuttle"
LandAnims(3)="ZombieScuttle"
AirStillAnim="ZombieSpring"
TakeoffStillAnim="ZombieLeap"
IdleCrouchAnim="ZombieLeapIdle"
IdleWeaponAnim="ZombieLeapIdle"
IdleRestAnim="ZombieLeapIdle"
SpineBone1=
bOrientOnSlope=True
AmbientSound=Sound'KFOldSchoolZeds_Sounds.Shared.Male_ZombieBreath'
Mesh=SkeletalMesh'KFCharacterModelsOldSchool.Shade'
Skins(0)=Texture'KFOldSchoolZeds_Textures.Crawler.CrawlerSkin'
Skins(1)=FinalBlend'KFOldSchoolZeds_Textures.Crawler.CrawlerHairFB'
CollisionHeight=25.000000
}