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

KFMod.FirstAidKitMP


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
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
//====================================================================
//  First Aid Kit Multiplay Version
//====================================================================

class FirstAidKitMP extends MiniHealthPack;

var() localized string  Message;

static function string GetLocalString(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1,
    optional PlayerReplicationInfo RelatedPRI_2
    )
{
    return Default.PickupMessage;
}


//function ResetInjuries()
//{

//Other.GroundSpeed = 210;
//}

function RespawnEffect()
{
// Get rid of the Yellow puff. It's not welcome here.
}

auto state Pickup
{
    function Touch( actor Other )
    {
        local Pawn P;
        local PlayerController PC;

        P = Pawn(Other);
        PC = PlayerController(P.Controller);

           if (Pawn(Other).Health > (Pawn(Other).HealthMax * 0.75 ))
            {
                if ( P != None )
                {
                Message="Your Health must be below 75% to pick this up";
                PC.ClientMessage(Message, 'KFCriticalEvent');
                }
            }


        if ( ValidTouch(Other) && Pawn(Other).Health <= (Pawn(Other).HealthMax * 0.75 ) )
        {

            if ( P.GiveHealth(HealingAmount, GetHealMax(P)) || (bSuperHeal && !Level.Game.bTeamGame) )
            {
                AnnouncePickup(P);
                SetRespawn();
            }
        }
    }
}


function AnnouncePickup( Pawn Receiver )
{
    Receiver.HandlePickup(self);
    PlaySound( PickupSound,SLOT_Interact,2*100,,100 );
}

defaultproperties
{
     HealingAmount=50
     bSuperHeal=False
     RespawnTime=300.000000
     PickupMessage="You used a First Aid Kit"
     PickupSound=Sound'KF_InventorySnd.Medkit_Pickup'
     StaticMesh=StaticMesh'KillingFloorStatics.FirstAidKit'
     DrawScale=1.000000
     AmbientGlow=40
     ScaleGlow=0.000000
     CollisionRadius=35.000000
     CollisionHeight=20.000000
     RotationRate=(Yaw=0)
}

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:01.791 - Created with UnCodeX