SpatialFear.SFSpriteBallExplosion

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
//=============================================================================
// Spatial Fear
// Class: SFSpriteBallExplosion
// Descripton: SF effect used in various places (Yellow/Red Explosion)
//
// Author: Markus Nuebel
//=============================================================================

class SFSpriteBallExplosion extends AnimSpriteEffect;

//#exec TEXTURE IMPORT NAME=ExplosionPal FILE=..\unrealshare\textures\exppal.pcx GROUP=Effects
#exec obj load file=k_GorillaTex.utx package=k_GorillaTex

var int ExpCount, MissCount;

simulated function PostBeginPlay()
{
	if ( Role == ROLE_Authority )
		MakeSound();
	if ( !Level.bDropDetail )
		Texture = SpriteAnim[int(FRand()*1)];
	if ( (Level.NetMode!=NM_DedicatedServer) && Level.bHighDetailMode && !Level.bDropDetail )
		SetTimer(0.05+FRand()*0.04,False);
	else
		LightRadius = 6;
	Super.PostBeginPlay();
}

simulated Function Timer()
{
	if ( Level.bDropDetail )
		return;
	if ( FRand() < 0.4 + (MissCount - 1.5 * ExpCount) * 0.25 )
	{
		ExpCount++;
		Spawn(class'SFSpriteBallChild',Self, '', Location + (20 + 20 * FRand()) * (VRand() + Vect(0,0,0.5)) );
	}
	else
		MissCount++;
	if ( (ExpCount < 3) && (LifeSpan > 0.45) )
		SetTimer(0.05+FRand()*0.05,False);

}

function MakeSound()
{
	PlaySound(EffectSound1,,12.0,,2200);
}

defaultproperties
{
     SpriteAnim(0)=Texture'k_GorillaTex.Explosion.g_explo_a00'
     NumFrames=8
     Pause=0.050000
     EffectSound1=Sound'UnrealShare.General.Explo1'
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=0.700000
     DrawType=DT_SpriteAnimOnce
     Style=STY_Translucent
     Texture=Texture'k_GorillaTex.Explosion.g_explo_a00'
     Skin=Texture'UnrealShare.Effects.ExplosionPal'
     DrawScale=1.400000
     LightType=LT_TexturePaletteOnce
     LightEffect=LE_NonIncidence
     LightBrightness=192
     LightHue=27
     LightSaturation=71
     LightRadius=9
     bCorona=False
}

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