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

UnrealShare.SkaarjProjectile


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
//=============================================================================
// SkaarjProjectile.
//=============================================================================
class SkaarjProjectile expands Projectile;

#exec TEXTURE IMPORT NAME=ExplosionPal FILE=textures\exppal.pcx GROUP=Effects
#exec OBJ LOAD FILE=textures\SkaarjP.utx PACKAGE=UnrealShare.SKEffect

#exec AUDIO IMPORT FILE="Sounds\Skaarj\skasht2.WAV" NAME="Skrjshot" GROUP="Skaarj"
#exec AUDIO IMPORT FILE="Sounds\Skaarj\skaimp3.WAV" NAME="SkrjImp" GROUP="Skaarj"

auto state Flying
{
    simulated function Timer()
    {
        Texture = Texture'Skj_a04';
    }

    simulated function ProcessTouch (Actor Other, Vector HitLocation)
    {
        local vector momentum;
    
        if ( !Other.IsA('SkaarjWarrior') )
        {
            if ( Role == ROLE_Authority )
            {
                momentum = 10000.0 * Normal(Velocity);
                Other.TakeDamage(Damage, instigator, HitLocation, momentum, 'zapped');
            }
            Destroy();
        }
    }

    function MakeSound()
    {
        PlaySound(ImpactSound);
        MakeNoise(1.0);
    }
            
    simulated function Explode(vector HitLocation, vector HitNormal)
    {
        local EnergyBurst e;

        MakeSound();
        if ( Level.NetMode != NM_DedicatedServer )
        {
            e = spawn(class 'EnergyBurst',,,HitLocation+HitNormal*9);
            e.RemoteRole = ROLE_None;
        }
        destroy();
    }

    function BeginState()
    {
        if ( ScriptedPawn(Instigator) != None )
            Speed = ScriptedPawn(Instigator).ProjectileSpeed;
        Velocity = Vector(Rotation) * speed;
        PlaySound(SpawnSound);
        SetTimer(0.20,False);
    }

Begin:
    Sleep(7.0); //self destruct after 7.0 seconds
    Explode(Location, vect(0,0,0));
}

defaultproperties
{
     speed=800.000000
     MaxSpeed=1200.000000
     Damage=16.000000
     SpawnSound=Sound'UnrealShare.Skaarj.Skrjshot'
     ImpactSound=Sound'UnrealShare.Skaarj.SkrjImp'
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=7.300000
     DrawType=DT_Sprite
     Style=STY_Translucent
     Texture=Texture'UnrealShare.SKEffect.Skj_a00'
     DrawScale=0.700000
     bUnlit=True
     bMeshCurvy=False
     LightType=LT_Steady
     LightEffect=LE_NonIncidence
     LightBrightness=149
     LightHue=165
     LightSaturation=186
     LightRadius=4
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sun 21/2/2010 23:48:40.000 - Creation time: Sun 21/2/2010 23:49:53.599 - Created with UnCodeX