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

XPickups.AdrenalinePickup


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
//=============================================================================
// AdrenalinePickup
//=============================================================================
class AdrenalinePickup extends TournamentPickUp;

var float AdrenalineAmount;

/* DetourWeight()
value of this path to take a quick detour (usually 0, used when on route to distant objective, but want to grab inventory for example)
*/
function float DetourWeight(Pawn Other,float PathWeight)
{
    if ( (PathWeight > 500) || !Other.Controller.NeedsAdrenaline() )
        return 0;
    if ( (Other.Controller.Enemy != None) && (Level.TimeSeconds - Other.Controller.LastSeenTime < 1) )
        return 0;
    
    return 0.15/PathWeight;
}

event float BotDesireability(Pawn Bot)
{
    if ( Bot.Controller.bHuntPlayer )
        return 0;
    if ( !Bot.Controller.NeedsAdrenaline() )
        return 0;
    return MaxDesireability;
}

auto state Pickup
{   
    function Touch( actor Other )
    {
        local Pawn P;
            
        if ( ValidTouch(Other) ) 
        {           
            P = Pawn(Other);    
            P.Controller.AwardAdrenaline(AdrenalineAmount);
            AnnouncePickup(P);
            SetRespawn();           
        }
    }
}

defaultproperties
{
     AdrenalineAmount=2.000000
     MaxDesireability=0.300000
     RespawnTime=30.000000
     PickupMessage="Adrenaline "
     PickupSound=Sound'PickupSounds.AdrenelinPickup'
     PickupForce="AdrenelinPickup"
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'XPickups_rc.AdrenalinePack'
     CullDistance=5500.000000
     Physics=PHYS_Rotating
     DrawScale=0.070000
     AmbientGlow=128
     ScaleGlow=0.600000
     Style=STY_AlphaZ
     CollisionRadius=32.000000
     CollisionHeight=23.000000
     Mass=10.000000
     RotationRate=(Yaw=24000)
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 23/10/2006 20:33:10.000 - Creation time: Wed 7/2/2007 19:16:33.187 - Created with UnCodeX