Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

KFStoryGame.ZombieBoss_NoZEDTime


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
// Patriarch used in the 2014 KFO map.  Killing Him won't cause ZED time or any other End of match effects.

class ZombieBoss_NoZEDTime extends ZombieBoss_STANDARD;

var bool SpawnedEyeBall;

var name EyeBallBoneName;

function TakeDamage(int Damage, Pawn InstigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional int HitIndex)
{
    // Don't take damage from other patriarchs.
    if(InstigatedBy != none && InstigatedBy.IsA('ZombieBoss'))
    {
        return;
    }

    Super.TakeDamage(Damage,InstigatedBy,HitLocation,Momentum,DamageType,HitIndex);
}

function Died(Controller Killer, class<DamageType> damageType, vector HitLocation)
{
    local ZombieBoss Patriarch;
    local vector EyeSpawnLocation;
    local Pickup_PatriarchEyeball EyeBall;

    super(KFMonster).Died(Killer,damageType,HitLocation);

    // If there's another patriarch alive somewhere, then don't do the end of match stuff.

    foreach DynamicActors(class 'ZombieBoss', Patriarch)
    {
        if(Patriarch != none && Patriarch != self && Patriarch.Health > 0)
        {
            return;
        }
    }

    // Last Patriarch died!!  Drama ! and Eyeballs! Woo!
    if(KFGameType(Level.Game) != none)
    {
        KFGameType(Level.Game).DramaticEvent(1.f,4.f);
    }

    // Spawn an eyeball!
    if(!SpawnedEyeBall)
    {
        EyeSpawnLocation = Location + (vect(0,0,1) * CollisionHeight/2);
        SetBoneScale(0,0.01,EyeBallBoneName);

        SpawnedEyeBall = true;
        EyeBall = Spawn(class 'Pickup_PatriarchEyeball',self,'PatriarchEyeBallTag',EyeSpawnLocation,Rotation);
        if(EyeBall != none)
        {
            EyeBall.Velocity = Normal(EyeSpawnLocation - HitLocation) * 100.f + vect(0,0,1) * 20.f ;
        }
    }

}

defaultproperties
{
     EyeBallBoneName="CHR_HeadBone_eyeball6"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fri 13-10-2023 03:17:28.000 - Creation time: Fri 13-10-2023 03:19:11.219 - Created with UnCodeX