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

UnrealI.GasbagBelch


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
00102
00103
00104
00105
//=============================================================================
// GasbagBelch.
//=============================================================================
class GasbagBelch extends Projectile;

#exec TEXTURE IMPORT NAME=gbProj0 FILE=MODELS\gb_a00.pcx GROUP=Effects
#exec TEXTURE IMPORT NAME=gbProj1 FILE=MODELS\gb_a01.pcx GROUP=Effects
#exec TEXTURE IMPORT NAME=gbProj2 FILE=MODELS\gb_a02.pcx GROUP=Effects
#exec TEXTURE IMPORT NAME=gbProj3 FILE=MODELS\gb_a03.pcx GROUP=Effects
#exec TEXTURE IMPORT NAME=gbProj4 FILE=MODELS\gb_a04.pcx GROUP=Effects
#exec TEXTURE IMPORT NAME=gbProj5 FILE=MODELS\gb_a05.pcx GROUP=Effects

#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\flak\expl2.wav" NAME="expl2" GROUP="flak"

var() texture SpriteAnim[6];
var int i;


simulated function Timer()
{
    Texture = SpriteAnim[i];
    i++;
    if (i>=6) i=0;
}

function SetUp()
{
    if ( ScriptedPawn(Instigator) != None )
        Speed = ScriptedPawn(Instigator).ProjectileSpeed;
    Velocity = Vector(Rotation) * speed;
    MakeNoise ( 1.0 );
    PlaySound(SpawnSound);
}

simulated function PostBeginPlay()
{
    SetUp();
    if ( Level.NetMode != NM_DedicatedServer )
    {
        Texture = SpriteAnim[0];
        i=1;
        SetTimer(0.15,True);
    }
    Super.PostBeginPlay();
}

auto state Flying
{


simulated function ProcessTouch (Actor Other, Vector HitLocation)
{
    if (Other != instigator)
    {
        if ( Role == ROLE_Authority )
            Other.TakeDamage(Damage, instigator,HitLocation,
                    15000.0 * Normal(velocity), 'burned');
        Explode(HitLocation, Vect(0,0,0));
    }
}

simulated function Explode(vector HitLocation, vector HitNormal)
{
    local SpriteBallExplosion s;

    if ( (Role == ROLE_Authority) && (FRand() < 0.5) )
        MakeNoise(1.0); //FIXME - set appropriate loudness

    s = Spawn(class'SpriteBallExplosion',,,HitLocation+HitNormal*9);
    s.RemoteRole = ROLE_None;
    Destroy();
}

Begin:
    Sleep(3);
    Explode(Location, Vect(0,0,0));
}

defaultproperties
{
     SpriteAnim(0)=Texture'UnrealI.Effects.gbProj0'
     SpriteAnim(1)=Texture'UnrealI.Effects.gbProj1'
     SpriteAnim(2)=Texture'UnrealI.Effects.gbProj2'
     SpriteAnim(3)=Texture'UnrealI.Effects.gbProj3'
     SpriteAnim(4)=Texture'UnrealI.Effects.gbProj4'
     SpriteAnim(5)=Texture'UnrealI.Effects.gbProj5'
     speed=600.000000
     Damage=40.000000
     ImpactSound=Sound'UnrealShare.flak.expl2'
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=3.500000
     DrawType=DT_Sprite
     Style=STY_Translucent
     Texture=Texture'UnrealI.Effects.gbProj0'
     DrawScale=1.800000
     Fatness=0
     bUnlit=True
     LightType=LT_Steady
     LightEffect=LE_NonIncidence
     LightBrightness=255
     LightHue=5
     LightSaturation=16
     LightRadius=9
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:06:32.000 - Creation time: za 22-4-2006 13:07:25.828 - Created with UnCodeX