Core.Object | +--Engine.Actor | +--Engine.Effects | +--UnrealShare.AnimSpriteEffect | +--Botpack.UT_SpriteBallExplosion
ExpCount,
MissCount
void
MakeSound()
simulated
PostBeginPlay()
Timer()
00001 //============================================================================= 00002 // UT_SpriteBallExplosion. 00003 //============================================================================= 00004 class UT_SpriteBallExplosion extends AnimSpriteEffect; 00005 00006 #exec TEXTURE IMPORT NAME=ExplosionPal FILE=..\unrealshare\textures\exppal.pcx GROUP=Effects 00007 #exec OBJ LOAD FILE=textures\UT_Explosion.utx PACKAGE=Botpack.UT_Explosions 00008 00009 var int ExpCount, MissCount; 00010 00011 simulated function PostBeginPlay() 00012 { 00013 if ( Role == ROLE_Authority ) 00014 MakeSound(); 00015 if ( !Level.bDropDetail ) 00016 Texture = SpriteAnim[Rand(3)]; 00017 if ( (Level.NetMode!=NM_DedicatedServer) && Level.bHighDetailMode && !Level.bDropDetail ) 00018 SetTimer(0.05+FRand()*0.04,False); 00019 else 00020 LightRadius = 6; 00021 Super.PostBeginPlay(); 00022 } 00023 00024 simulated Function Timer() 00025 { 00026 if ( Level.bDropDetail ) 00027 return; 00028 if ( FRand() < 0.4 + (MissCount - 1.5 * ExpCount) * 0.25 ) 00029 { 00030 ExpCount++; 00031 Spawn(class'UT_SpriteBallChild',Self, '', Location + (20 + 20 * FRand()) * (VRand() + Vect(0,0,0.5)) ); 00032 } 00033 else 00034 MissCount++; 00035 if ( (ExpCount < 3) && (LifeSpan > 0.45) ) 00036 SetTimer(0.05+FRand()*0.05,False); 00037 00038 } 00039 00040 function MakeSound() 00041 { 00042 PlaySound(EffectSound1,,12.0,,2200); 00043 } 00044 00045 defaultproperties 00046 { 00047 SpriteAnim(0)=Texture'Botpack.UT_Explosions.exp1_a00' 00048 SpriteAnim(1)=Texture'Botpack.UT_Explosions.Exp6_a00' 00049 SpriteAnim(2)=Texture'Botpack.UT_Explosions.Exp7_a00' 00050 NumFrames=8 00051 Pause=0.050000 00052 EffectSound1=Sound'UnrealShare.General.Explo1' 00053 RemoteRole=ROLE_SimulatedProxy 00054 LifeSpan=0.700000 00055 DrawType=DT_SpriteAnimOnce 00056 Style=STY_Translucent 00057 Texture=Texture'Botpack.UT_Explosions.exp1_a00' 00058 Skin=Texture'UnrealShare.Effects.ExplosionPal' 00059 DrawScale=1.400000 00060 LightType=LT_TexturePaletteOnce 00061 LightEffect=LE_NonIncidence 00062 LightBrightness=192 00063 LightHue=27 00064 LightSaturation=71 00065 LightRadius=9 00066 bCorona=False 00067 }