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

UnrealI.rocket


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

#exec MESH IMPORT MESH=RocketM ANIVFILE=MODELS\rocket_a.3D DATAFILE=MODELS\rocket_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=RocketM X=0 Y=-240 Z=0 YAW=-64

#exec MESH SEQUENCE MESH=RocketM SEQ=All       STARTFRAME=0   NUMFRAMES=6
#exec MESH SEQUENCE MESH=RocketM SEQ=Still     STARTFRAME=0   NUMFRAMES=1
#exec MESH SEQUENCE MESH=RocketM SEQ=WingIn    STARTFRAME=1   NUMFRAMES=1
#exec MESH SEQUENCE MESH=RocketM SEQ=Armed     STARTFRAME=1   NUMFRAMES=3
#exec MESH SEQUENCE MESH=RocketM SEQ=SpinCCW   STARTFRAME=4   NUMFRAMES=1
#exec MESH SEQUENCE MESH=RocketM SEQ=SpinCW    STARTFRAME=5   NUMFRAMES=1

#exec TEXTURE IMPORT NAME=JRocket1 FILE=MODELS\rocket.PCX
#exec OBJ LOAD FILE=Textures\fireeffect16.utx PACKAGE=UNREALI.Effect16
#exec MESHMAP SCALE MESHMAP=rocketM X=0.5 Y=0.5 Z=1.0 YAW=128
#exec MESHMAP SETTEXTURE MESHMAP=rocketM NUM=1 TEXTURE=Jrocket1

#exec AUDIO IMPORT FILE="Sounds\EightBal\Ignite.WAV" NAME="Ignite" GROUP="Eightball"
#exec AUDIO IMPORT FILE="Sounds\EightBal\grenflor.wav" NAME="GrenadeFloor" GROUP="Eightball"
#exec AUDIO IMPORT FILE="Sounds\General\brufly1.WAV" NAME="Brufly1" GROUP="General"

var Actor Seeking;
var float MagnitudeVel,Count,SmokeRate;
var vector InitialDir;
var bool bRing,bHitWater,bWaterStart;
var int NumExtraRockets;

simulated function PostBeginPlay()
{
    Count = -0.1;
    if (Level.bHighDetailMode) SmokeRate = 0.035;
    else SmokeRate = 0.15;
}

simulated function Tick(float DeltaTime)
{
    local SpriteSmokePuff b;

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

auto state Flying
{

    simulated function ZoneChange( Zoneinfo NewZone )
    {
        local waterring w;
        
        if (!NewZone.bWaterZone || bHitWater) Return;

        bHitWater = True;
        Disable('Tick');
        w = Spawn(class'WaterRing',,,,rot(16384,0,0));
        w.DrawScale = 0.2;
        w.RemoteRole = ROLE_None;
        Velocity=0.6*Velocity;
        PlayAnim( 'Still', 3.0 );       
    }

    function ProcessTouch (Actor Other, Vector HitLocation)
    {
        if ((Other != instigator) && (Rocket(Other) == none)) 
            Explode(HitLocation,Normal(HitLocation-Other.Location));
    }

    function Explode(vector HitLocation, vector HitNormal)
    {
        HurtRadius(Damage,200.0, 'exploded', MomentumTransfer, HitLocation );
        spawn(class'SpriteBallExplosion',,,HitLocation + HitNormal*16); 
        if (bRing) Spawn(class'RingExplosion3',,,HitLocation + HitNormal*16,rotator(HitNormal));
        Destroy();
    }

    function BeginState()
    {
        initialDir = vector(Rotation);  
        Velocity = speed*initialDir;
        Acceleration = initialDir*50;
        PlaySound(SpawnSound, SLOT_None, 2.3);  
        PlayAnim( 'Armed', 0.2 );
        if (Region.Zone.bWaterZone)
        {
            bHitWater = True;
            Velocity=0.6*Velocity;
        }
    }
}

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:46.546 - Created with UnCodeX