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

UnrealI.BruteProjectile


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

#exec MESH IMPORT MESH=srocket ANIVFILE=MODELS\srocket_a.3D DATAFILE=MODELS\srocket_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=srocket X=0 Y=0 Z=-40 YAW=0 ROLL=0 PITCH=-64
#exec MESH SEQUENCE MESH=srocket SEQ=All       STARTFRAME=0   NUMFRAMES=16
#exec MESH SEQUENCE MESH=srocket SEQ=Ignite    STARTFRAME=0   NUMFRAMES=3
#exec MESH SEQUENCE MESH=srocket SEQ=Flying    STARTFRAME=3   NUMFRAMES=13
#exec TEXTURE IMPORT NAME=JTeace1 FILE=MODELS\srocket.PCX
#exec OBJ LOAD FILE=textures\FireEffect18.utx PACKAGE=UNREALI.Effect18
#exec MESHMAP SCALE MESHMAP=srocket  X=1.0 Y=1.0 Z=2.0
#exec MESHMAP SETTEXTURE MESHMAP=srocket NUM=1 TEXTURE=JTeace1
#exec MESHMAP SETTEXTURE MESHMAP=srocket NUM=0 TEXTURE=Unreali.Effect18.FireEffect18

#exec AUDIO IMPORT FILE="Sounds\General\8blfly2.WAV" NAME="BRocket" GROUP="General"
#exec AUDIO IMPORT FILE="Sounds\EightBal\Ignite.WAV" NAME="Ignite" GROUP="Eightball"
#exec AUDIO IMPORT FILE="Sounds\flak\Explode1.WAV" NAME="Explode1" GROUP="flak"

var float TimerDelay;

auto state Flying
{

    simulated function Timer()
    {
        local SpriteSmokePuff bs;
            
        if (Level.NetMode!=NM_DedicatedServer) 
        {
            bs = Spawn(class'SpriteSmokePuff');
            bs.RemoteRole = ROLE_None;      
        }
        SetTimer(TimerDelay,True);          
        TimerDelay += 0.01;
    }

    function ProcessTouch (Actor Other, Vector HitLocation)
    {
        if (Other != instigator)
            Explode(HitLocation,Vect(0,0,0));
    }
    
    function Explode(vector HitLocation, vector HitNormal)
    {
        HurtRadius(damage, 50 + instigator.skill * 45, 'exploded', MomentumTransfer, HitLocation);
        PlaySound(ImpactSound);
        MakeNoise(1.0);
        spawn(class 'SpriteBallExplosion',,'',HitLocation+HitNormal*10 );
        Destroy();
    }

    simulated function AnimEnd()
    {
        LoopAnim('Flying');
        Disable('AnimEnd');
    }

    function BeginState()
    {
        PlayAnim('Ignite',0.5);
        PlaySound(SpawnSound);
        Velocity = Vector(Rotation) * speed;
        if ( ScriptedPawn(Instigator) != None )
        {
            Speed = ScriptedPawn(Instigator).ProjectileSpeed;
            if ( Instigator.IsA('LesserBrute') )
                Damage *= 0.7;
        }
        if (Level.bHighDetailMode) TimerDelay = 0.03;
        else TimerDelay = 5.0;;
        Timer();
    }

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

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 12:52:32.000 - Creation time: za 22-4-2006 12:53:44.671 - Created with UnCodeX