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

UnrealShare.TarydiumBarrel


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
//=============================================================================
// TarydiumBarrel.
//=============================================================================
class TarydiumBarrel expands SteelBarrel;

#exec TEXTURE IMPORT NAME=Jsteelbarrel2 FILE=MODELS\steelbt.PCX GROUP="Skins"

var bool bChainedExplosion, bDestroy;

auto state active
{

    function Timer()
    {
        local int NumChunks;
        local SpriteBallExplosion s;
        local RingExplosion3 r;
        
        Super.Timer();
        
        if (!bDestroy) Return;
        
        NumChunks = 12;
        s = spawn(class'SpriteBallExplosion');
        r = spawn(class'RingExplosion3',,,Location - Vect(0,0,16),rot(16384,0,0));
        r.PlaySound(r.ExploSound,,6);
        HurtRadius(250, 100, 'destroyed', 0, Location);
        if (bChainedExplosion) NumChunks = 4;
        skinnedFrag(class'Fragment1', texture'JSteelBarrel2', Vect(20000,0,0),1.0, 7);      
    }

    function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, 
                        Vector momentum, name damageType)
    {
        bChainedExplosion = False;
        bDestroy=True;
        if (DamageType=='destroyed') {
            SetTimer(FRand()*0.4+0.2,False);
            bChainedExplosion = True;
        }
        else Timer();
        Instigator = InstigatedBy;      
        if ( Instigator != None )
            MakeNoise(1.0);
    }

Begin:
}

defaultproperties
{
     Health=1
     Skin=Texture'UnrealShare.Skins.Jsteelbarrel2'
}

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.849 - Created with UnCodeX