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

UnrealI.WarlordRocket


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

#exec MESH IMPORT MESH=perock ANIVFILE=MODELS\perock_a.3D DATAFILE=MODELS\perock_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=perock X=0 Y=0 Z=0 YAW=0 ROLL=0 PITCH=-64
#exec MESH SEQUENCE MESH=perock SEQ=All       STARTFRAME=0   NUMFRAMES=16
#exec MESH SEQUENCE MESH=perock SEQ=Ignite    STARTFRAME=0   NUMFRAMES=3
#exec MESH SEQUENCE MESH=perock SEQ=Flying    STARTFRAME=3   NUMFRAMES=13
#exec TEXTURE IMPORT NAME=Jpeace1 FILE=MODELS\peaceg.PCX
#exec MESHMAP SCALE MESHMAP=perock  X=0.1 Y=0.1 Z=0.2
#exec MESHMAP SETTEXTURE MESHMAP=perock NUM=1 TEXTURE=Jpeace1

#exec AUDIO IMPORT FILE="Sounds\General\8blfly2.WAV" NAME="BRocket" GROUP="General"

var vector OriginalDirection;
var float Count,SmokeRate;

function Explode(vector HitLocation, vector HitNormal)
{
    HurtRadius(damage, 200.0, 'exploded', MomentumTransfer, HitLocation);
    Spawn(class'SpriteBallExplosion', Pawn(Owner),,HitLocation);    
    Destroy();
}


function Tick(float DeltaTime)
{
    local SpriteSmokePuff b;

    Count += DeltaTime;
    if ( (Count>(SmokeRate+FRand()*SmokeRate)) && (Level.NetMode!=NM_DedicatedServer) ) 
    {
        b = Spawn(class'SpriteSmokePuff');
        b.RemoteRole = ROLE_None;       
        Count=0.0;
    }
}

auto state Flying
{

/*  function Timer()
    {
        local vector EnemyDir;

        if ( (Instigator != None) && (Instigator.Enemy != None) )
        {
            EnemyDir = Normal(Instigator.Enemy.Location - Location);
            if ( (EnemyDir Dot OriginalDirection) > 0 )
            {
                Velocity =  speed * Normal(EnemyDir * speed * (0.25 + instigator.skill * 0.1) + Velocity);      
                SetRotation(Rotator(Velocity));
            }
        }
    }
*/
    function ProcessTouch (Actor Other, Vector HitLocation)
    {
        if ((PeaceRocket(Other) == none) && (Other != Instigator) ) 
            Explode(HitLocation, vect(0,0,0));
    }


    function BeginState()
    {
        if (Level.bHighDetailMode) SmokeRate = 0.035;
        else SmokeRate = 0.15;  
        PlaySound(SpawnSound);
        OriginalDirection = Vector(Rotation);   
        Velocity = OriginalDirection * 500.0;
        Acceleration = Velocity * 0.4;  
        //SetTimer(0.1,True);
    }

Begin:
    Sleep(7.0);
    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:47.890 - Created with UnCodeX