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

UnrealShare.ExplosionChain


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
//=============================================================================
// ExplosionChain.
//=============================================================================
class ExplosionChain extends Effects;


#exec Texture Import File=models\exp001.pcx Name=s_Exp001 Mips=Off Mask=On Flags=2

var() float MomentumTransfer;
var() float Damage;
var() float Size;
var() float Delaytime;

var bool bExploding;

function PreBeginPlay()
{
    Texture=None;
    Super.PreBeginPlay();
}

singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, 
                        Vector momentum, name damageType)
{
    if (bOnlyTriggerable && DamageType!='Detonated') Return;
    
    Instigator = InstigatedBy;
    MakeNoise(1.0);
    GoToState('Exploding');
}

function Trigger( actor Other, pawn EventInstigator )
{
    TakeDamage(10, EventInstigator, Location, Vector(Rotation), 'Detonated');
}

//////////////////////////////////////////////////////////////
state Exploding
{
    ignores TakeDamage;

    function Timer()
    {
        local SpriteBallExplosion f;
        
        bExploding = true;
        HurtRadius(damage, Damage+100, 'Detonated', MomentumTransfer, Location);
        f = spawn(class'SpriteBallExplosion',,,Location + vect(0,0,1)*16,rot(16384,0,0)); 
        f.DrawScale = (Damage/100+0.4+FRand()*0.5)*Size;
        Destroy();
    }
    
    function BeginState()
    {
        bExploding = True;
        SetTimer(DelayTime+FRand()*DelayTime*2, False);
    }
}

defaultproperties
{
     MomentumTransfer=100000.000000
     Damage=100.000000
     Size=1.000000
     DelayTime=0.300000
     bNetTemporary=False
     RemoteRole=ROLE_SimulatedProxy
     DrawType=DT_Sprite
     Texture=Texture'UnrealShare.s_Exp001'
     DrawScale=0.400000
     bCollideActors=True
     bCollideWorld=True
     bProjTarget=True
}

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