Core.Object | +--Engine.Actor | +--Engine.Effects | +--RuneI.BlastRadius
float
TimePassed
void
DoRadiusEffect()
PushActor(Actor A)
simulated
Spawned()
Tick(float DeltaTime)
00001 //============================================================================= 00002 // BlastRadius. 00003 //============================================================================= 00004 class BlastRadius expands Effects; 00005 00006 00007 var float TimePassed; 00008 const StartRadius = 22.0; 00009 const EndRadius=500.0; 00010 const EffectTime=1.0; 00011 00012 simulated function Spawned() 00013 { 00014 TimePassed=0.0; 00015 ScaleGlow = EffectTime; 00016 00017 DoRadiusEffect(); 00018 } 00019 00020 function PushActor(actor A) 00021 { 00022 local vector Vel; 00023 00024 Vel = Normal(A.Location-Location); 00025 Vel.Z = 0.5; 00026 Vel *= 600; 00027 A.AddVelocity(Vel); 00028 } 00029 00030 function DoRadiusEffect() 00031 { 00032 local actor A; 00033 foreach RadiusActors(class'actor', A, EndRadius, Location) 00034 { 00035 if (A==Instigator) 00036 continue; 00037 00038 if (A.bHidden) 00039 continue; 00040 00041 if (!FastTrace(Location, A.Location)) 00042 continue; 00043 00044 if(A.IsA('ScriptPawn') && ScriptPawn(A).bIsBoss) 00045 continue; 00046 00047 PushActor(A); 00048 } 00049 } 00050 00051 simulated function Tick(float DeltaTime) 00052 { 00053 local float newRadius; 00054 00055 TimePassed += DeltaTime; 00056 newRadius = StartRadius + (EndRadius-StartRadius) * (TimePassed/EffectTime); 00057 DrawScale = newRadius/StartRadius; 00058 00059 // Fade the blast radius out 00060 ScaleGlow -= DeltaTime; 00061 if(ScaleGlow <= 0) 00062 Destroy(); 00063 // SetCollisionSize(newRadius, CollisionHeight); 00064 } 00065 00066 defaultproperties 00067 { 00068 RemoteRole=ROLE_SimulatedProxy 00069 DrawType=DT_VerticalSprite 00070 Style=STY_Translucent 00071 Texture=Texture'RuneFX.Blastring' 00072 AmbientGlow=50 00073 CollisionRadius=22.000000 00074 CollisionHeight=22.000000 00075 bCollideActors=True 00076 }