Core.Object | +--Engine.Actor | +--Engine.ParticleSystem | +--RuneI.BeamSystem | +--RuneI.LightningSwordBeam
00001 //============================================================================= 00002 // LightningSwordBeam. 00003 //============================================================================= 00004 class LightningSwordBeam expands BeamSystem; 00005 00006 //============================================================================= 00007 // 00008 // SystemTick 00009 // 00010 // Called when the particle system is ticked IF bEventSystemTick is true 00011 //============================================================================= 00012 00013 event SystemTick(float DeltaSeconds) 00014 { 00015 local int i; 00016 local float amp; 00017 local vector v; 00018 local vector X, Y, Z; 00019 local float dist; 00020 00021 if(Target == None) 00022 { 00023 return; 00024 } 00025 00026 BeamTime += DeltaSeconds; 00027 00028 if(TargetJointIndex == 0) 00029 { 00030 v = Target.Location - Location; 00031 } 00032 else 00033 { 00034 v = Target.GetJointPos(TargetJointIndex) - Location; 00035 } 00036 00037 dist = VSize(v) * 0.03; 00038 GetAxes(rotator(v), X, Y, Z); 00039 00040 for(i = 0; i < NumConPts; i++) 00041 { 00042 if(i < NumConPts / 2) 00043 { 00044 amp = dist * float(i) / NumConPts; 00045 } 00046 else 00047 { 00048 amp = dist * float(NumConPts - i) / NumConPts; 00049 } 00050 00051 ConnectionOffset[i] = Z * 6 * amp * sin(BeamTime * 30 + i * 0.5) 00052 + Y * amp * 7 * sin(BeamTime * 25 + i * 0.5); 00053 } 00054 } 00055 00056 defaultproperties 00057 { 00058 ParticleCount=30 00059 ParticleTexture(0)=Texture'RuneFX.beam' 00060 AlphaStart=60 00061 NumConPts=10 00062 BeamThickness=2.000000 00063 bTaperStartPoint=True 00064 bTaperEndPoint=True 00065 Style=STY_Translucent 00066 }