Core.Object | +--Engine.Actor | +--Engine.ParticleSystem | +--RuneI.BeamSystem | +--RuneI.DarkDwarfConcentrator
float
amplitude
int
powerlevel
void
Trigger(Actor Other, Pawn EventInstigator)
00001 //============================================================================= 00002 // DarkDwarfConcentrator. 00003 //============================================================================= 00004 class DarkDwarfConcentrator expands BeamSystem; 00005 00006 00007 var float amplitude; 00008 var int powerlevel; 00009 00010 function Trigger( Actor Other, Pawn EventInstigator ) 00011 { 00012 local actor A; 00013 00014 powerlevel++; 00015 amplitude += 10; 00016 BeamThickness+=10.000000; 00017 SoundVolume += 30; 00018 SoundPitch += 20; 00019 if (powerlevel >= 5) 00020 { // Powerlevel 4 00021 ParticleTexture[0]=Texture'RuneFX.swipe2'; 00022 BeamThickness=60.000000; 00023 amplitude = 70; 00024 } 00025 00026 // Broadcast the Trigger message to all matching actors. 00027 if( Event != '' ) 00028 foreach AllActors( class 'Actor', A, Event ) 00029 A.Trigger(Other, Other.Instigator); 00030 } 00031 00032 00033 //============================================================================= 00034 // 00035 // SystemTick 00036 // 00037 // Called when the particle system is ticked IF bEventSystemTick is true 00038 //============================================================================= 00039 event SystemTick(float DeltaSeconds) 00040 { 00041 local int i; 00042 local float amp; 00043 local vector v; 00044 local vector X, Y, Z; 00045 local float dist; 00046 00047 if(Target == None) 00048 { 00049 return; 00050 } 00051 00052 BeamTime += DeltaSeconds; 00053 00054 if(TargetJointIndex == 0) 00055 { 00056 v = Target.Location - Location; 00057 } 00058 else 00059 { 00060 v = Target.GetJointPos(TargetJointIndex) - Location; 00061 } 00062 00063 dist = VSize(v) * 0.03; 00064 GetAxes(rotator(v), X, Y, Z); 00065 00066 for(i = 0; i < NumConPts; i++) 00067 { 00068 if(i < NumConPts / 2) 00069 { 00070 amp = dist * float(i) / NumConPts; 00071 } 00072 else 00073 { 00074 amp = dist * float(NumConPts - i) / NumConPts; 00075 } 00076 00077 if (i != 0 && i != NumConPts-1) 00078 amp = amplitude; 00079 00080 ConnectionOffset[i] = Z * amp * sin(BeamTime * 20 + i * 0.5) 00081 + Y * amp * 2 * sin(BeamTime * 15 + i * 0.5); 00082 } 00083 } 00084 00085 defaultproperties 00086 { 00087 Amplitude=20.000000 00088 PowerLevel=1 00089 ParticleTexture(0)=Texture'RuneFX.swipe' 00090 AlphaStart=60 00091 AlphaEnd=60 00092 BeamThickness=8.000000 00093 Style=STY_Translucent 00094 SoundRadius=128 00095 SoundVolume=64 00096 AmbientSound=Sound'EnvironmentalSnd.Scifi.scifi01L' 00097 }