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

KFMod.KF_GnomeSmashable


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
00065
00066
00067
00068
00069
00070
/*
	--------------------------------------------------------------
	 KF_GnomeSmashable
	--------------------------------------------------------------

	His little gnome death cries will haunt you for years.

	Author :  Alex Quick

	--------------------------------------------------------------
*/

class KF_GnomeSmashable extends KFDECO_Smashable;

#exec OBJ LOAD FILE=HillbillyHorrorSND.uax
#exec OBJ LOAD FILE=HillbillyHorror_SM.usx

var(Sound)  Sound DeathSound;
var(Sound)  float DeathSoundVolume,DeathSoundRadius;

auto state Working
{
    function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
    {
        local Controller InstigatorC;

        // - Gnomes should only take damage from human players ..
        if(InstigatedBy != none)
        {
            InstigatorC = InstigatedBy.Controller;
            if(InstigatorC != none && KFPlayerController(InstigatorC) != none)
            {
                Super.TakeDamage(Damage,InstigatedBy,HitLocation,Momentum,damageType,HitIndex);
            }
        }
    }
}

state Broken
{
    function BeginState()
    {
        Super.beginState();
        if(DeathSound != none)
        {
            PlaySound(DeathSound,,DeathSoundVolume,,DeathSoundRadius,SoundPitch,true);
        }

        AmbientSound = none;
    }
}

defaultproperties
{
     DeathSound=Sound'HillbillyHorrorSND.General.KF_GnomeHeaven'
     DeathSoundVolume=255.000000
     DeathSoundRadius=100.000000
     bNeedsSingleShot=True
     EffectWhenDestroyed=Class'KFMod.GnomeSoul'
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'HillbillyHorror_SM.GardenGnome'
     bAlwaysRelevant=True
     bOnlyDirtyReplication=True
     AmbientSound=Sound'KF_BaseGorefast_xmas.Gorefast_IdleLoop'
     PrePivot=(Z=25.000000)
     SoundRadius=10.000000
     CollisionRadius=12.000000
     CollisionHeight=25.000000
}

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