# SpatialFear.SFExplosionChain

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 |
    //=============================================================================
    // Spatial Fear
    // Name: SFExplosionChain
    // Description: Explosion chain, that allows to configure the played effect.
    //				Default: UT_SpriteBallExplosion
    //
    // Author: Markus Nuebel
    //=============================================================================
    class SFExplosionChain extends ExplosionChain ;

    var (SpatialFear) class<Effects> ExplosionEffect;	// Type of explosion effect: Default: UT_SpriteBallExplosion
    var (SpatialFear) float ExplosionRadius; // What else than the hurt radius in UUs. Default: 100
    var (SpatialFear) float DrawScaleFactor; // Factor, to scale the drawscale, because different effects have different default drawscales. Default: 1.0

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

    	function Timer()
    	{
    		local Effects f;

    		bExploding = true;
     		f = spawn(ExplosionEffect,,,Location + vect(0,0,1)*16,rot(16384,0,0));
    		if(None != f)
    		{
    			f.HurtRadius(damage, ExplosionRadius, 'Detonated', MomentumTransfer, Location);
    	 		f.DrawScale = (Damage/100+0.4+FRand()*0.5)*Size*DrawScaleFactor;
    			Destroy();
    		}
    	}
    }

    defaultproperties
    {
         ExplosionEffect=Class'Botpack.UT_SpriteBallExplosion'
         ExplosionRadius=100.000000
         DrawScaleFactor=1.000000
         bNetTemporary=True
         bCollideWorld=False
    }

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:44 PM
Created with UnCodeX