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

Relics.RelicSpeedInventory


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
class RelicSpeedInventory expands RelicInventory;

#exec MESH IMPORT MESH=RelicHourglass ANIVFILE=MODELS\RelicHourglass_a.3d DATAFILE=MODELS\RelicHourglass_d.3d X=0 Y=0 Z=0 MLOD=0.5
#exec MESH ORIGIN MESH=RelicHourglass X=0 Y=0 Z=0
#exec MESH SEQUENCE MESH=RelicHourglass SEQ=All                      STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=RelicHourglass SEQ=base                     STARTFRAME=0 NUMFRAMES=1
#exec MESHMAP NEW   MESHMAP=RelicHourglass MESH=RelicHourglass
#exec MESHMAP SCALE MESHMAP=RelicHourglass X=0.1 Y=0.1 Z=0.2
#exec TEXTURE IMPORT NAME=JRelicHourglass_01 FILE=Textures\RelicHourglass.PCX GROUP=Skins FLAGS=2	//Material #2
#exec MESHMAP SETTEXTURE MESHMAP=RelicHourglass NUM=1 TEXTURE=JRelicHourglass_01

#exec AUDIO IMPORT FILE="Sounds\SpeedWind.WAV" NAME="SpeedWind" GROUP="Relics"

function PickupFunction(Pawn Other)
{
    Super.PickupFunction(Other);

    ShellEffect = Spawn(ShellType, Owner,,Owner.Location, Owner.Rotation); 
}

state Activated
{
    function BeginState()
    {
        SetTimer(0.2, True);

        Super.BeginState();

        // Alter player's stats.
        Pawn(Owner).AirControl = 0.65;
        Pawn(Owner).JumpZ *= 1.1;
        Pawn(Owner).GroundSpeed *= 1.3;
        Pawn(Owner).WaterSpeed *= 1.3;
        Pawn(Owner).AirSpeed *= 1.3;
        Pawn(Owner).Acceleration *= 1.3;

        // Add wind blowing.
        Pawn(Owner).AmbientSound = sound'SpeedWind';
        Pawn(Owner).SoundRadius = 64;
    }

    function EndState()
    {
        local float SpeedScale;
        SetTimer(0.0, False);

        Super.EndState();

        if ( Level.Game.IsA('DeathMatchPlus') && DeathMatchPlus(Level.Game).bMegaSpeed )
            SpeedScale = 1.3;
        else
            SpeedScale = 1.0;

        // Restore player's stats.
        Pawn(Owner).AirControl = DeathMatchPlus(Level.Game).AirControl;
        Pawn(Owner).JumpZ = Pawn(Owner).Default.JumpZ * Level.Game.PlayerJumpZScaling();
        Pawn(Owner).GroundSpeed = Pawn(Owner).Default.GroundSpeed * SpeedScale;
        Pawn(Owner).WaterSpeed = Pawn(Owner).Default.WaterSpeed * SpeedScale;
        Pawn(Owner).AirSpeed = Pawn(Owner).Default.AirSpeed * SpeedScale;
        Pawn(Owner).Acceleration = Pawn(Owner).Default.Acceleration * SpeedScale;

        // Remove sound.
        Pawn(Owner).AmbientSound = None;
    }
}

defaultproperties
{
     ShellType=Class'Relics.speedshell'
     PickupMessage="You picked up the Relic of Speed!"
     PickupViewMesh=Mesh'Relics.RelicHourglass'
     PickupViewScale=0.500000
     Icon=Texture'Relics.Icons.RelicIconSpeed'
     Physics=PHYS_Rotating
     Skin=Texture'Relics.Skins.JRelicHourglass_01'
     CollisionHeight=40.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: So 5.12.2004 09:34:48.000 - Creation time: Fr 7.6.2013 13:15:55.351 - Created with UnCodeX