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

Onslaught.ONSDaredevilMessage


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
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
class ONSDaredevilMessage extends LocalMessage;

#exec OBJ LOAD FILE="..\Sounds\announcermale2k4.uax"
#exec OBJ LOAD FILE="..\Sounds\ONSVehicleSounds-S.uax"

var     localized String    StuntInfoString1;
var     localized String    StuntInfoString2;
var     localized String    StuntInfoString3;
var     localized String    StuntInfoString4;
var     localized String    StuntInfoString5;
var     localized String    StuntInfoString6;
var     localized String    StuntInfoString7;
var     localized String    StuntInfoString8;
var     localized String    StuntDegrees;

var     sound               CheerSound;
var     int                 CheerPointThresh;

static function string GetString(
                                 optional int SwitchNum,
                                 optional PlayerReplicationInfo RelatedPRI_1,
                                 optional PlayerReplicationInfo RelatedPRI_2,
                                 optional Object OptionalObject
                                 )
{
    local ONSWheeledCraft Car;
    local string ResultString;

    Car = ONSWheeledCraft(OptionalObject);

    if(SwitchNum == 0)
        return Default.StuntInfoString1$Car.DaredevilPoints$Default.StuntInfoString2$Car.InAirDistance$Default.StuntInfoString3;
    else if(SwitchNum == 1)
    {
        if ( Car.InAirSpin >= Car.DaredevilThreshInAirSpin )
            ResultString = Default.StuntInfoString4$Car.InAirSpin$Default.StuntDegrees;
        if ( Car.InAirPitch >= Car.DaredevilThreshInAirPitch )
        {
            if ( ResultString != "" )
                ResultString = ResultString$Default.StuntInfoString7;
            ResultString = ResultString$Default.StuntInfoString5$Car.InAirPitch$Default.StuntDegrees;
        }
        if ( Car.InAirRoll >= Car.DaredevilThreshInAirRoll )
        {
            if ( ResultString != "" )
                ResultString = ResultString$Default.StuntInfoString7;
            ResultString = ResultString$Default.StuntInfoString6$Car.InAirRoll$Default.StuntDegrees;
        }
        if ( Car.InAirTime >= Car.DaredevilThreshInAirTime )
        {
            if ( ResultString != "" )
                ResultString = ResultString$Default.StuntInfoString7;
            ResultString = ResultString$Car.InAirTime$Default.StuntInfoString8;
        }
        return ResultString;
    }
}

static simulated function ClientReceive(
                                        PlayerController P,
                                        optional int SwitchNum,
                                        optional PlayerReplicationInfo RelatedPRI_1,
                                        optional PlayerReplicationInfo RelatedPRI_2,
                                        optional Object OptionalObject
                                        )
{
    local ONSWheeledCraft Car;

    Super.ClientReceive(P, SwitchNum, RelatedPRI_1, RelatedPRI_2, OptionalObject);

    if(SwitchNum == 0)
    {
        P.PlayRewardAnnouncement('DareDevil', 1, true);

        // If we got enough points - add a cheer as well!
        Car = ONSWheeledCraft(OptionalObject);

        if(Car.DaredevilPoints >= Default.CheerPointThresh)
            P.ClientPlaySound(Default.CheerSound);
    }
}

defaultproperties
{
     StuntInfoString1="Daredevil!  Level "
     StuntInfoString2=", "
     StuntInfoString3="m"
     StuntInfoString4="Spin: "
     StuntInfoString5="Flip: "
     StuntInfoString6="Roll: "
     StuntInfoString7=", "
     StuntInfoString8=" secs"
     StuntDegrees="°"
     CheerSound=Sound'ONSVehicleSounds-S.Misc.crowd_cheer'
     CheerPointThresh=20
     bFadeMessage=Wahr
     Lifetime=9
     DrawColor=(B=128,G=0)
     StackMode=SM_Down
     PosY=0.700000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:54.000 - Creation time: Mo 16.4.2007 11:20:50.890 - Created with UnCodeX