Core.Object | +--Engine.Actor | +--Engine.ParticleSystem | +--RuneI.WeaponHelix
float
CircleRadius
ElapsedTime
HalfLength
MaxDeviation
Multiplier
simulated
SystemInit()
// init function
SystemTick(float DeltaTime)
00001 //============================================================================= 00002 // WeaponHelix. 00003 //============================================================================= 00004 class WeaponHelix expands ParticleSystem; 00005 00006 var float ElapsedTime; 00007 00008 var float MaxDeviation; //Affects speed of the helix-travel.. 00009 var float CircleRadius; //Affects how wide the helix is.. 00010 var float HalfLength; //Affects how far back and forth the helix travels.. 00011 var float Multiplier; //Affects distance between particles.. 00012 00013 00014 // init function 00015 simulated function SystemInit() 00016 { 00017 local int i; 00018 local float f; 00019 00020 ElapsedTime = RandRange(0.0, 5.0); 00021 for (i=0; i<ParticleCount; i++) 00022 { 00023 ParticleArray[i].Valid = True; 00024 ParticleArray[i].Velocity = vect(0,0,0); 00025 ParticleArray[i].Alpha = vect(1,1,1)*AlphaStart; 00026 ParticleArray[i].LifeSpan = 0; 00027 ParticleArray[i].TextureIndex = 0; 00028 ParticleArray[i].Style = Style; 00029 00030 if (bRelativeToSystem) 00031 ParticleArray[i].Location = vect(0,0,0); 00032 else 00033 ParticleArray[i].Location = Location; 00034 00035 // small sparks 00036 f = ScaleMax; 00037 ParticleArray[i].ScaleStartX = f; 00038 ParticleArray[i].ScaleStartY = f; 00039 ParticleArray[i].XScale = f; 00040 ParticleArray[i].YScale = f; 00041 } 00042 00043 IsLoaded=true; 00044 } 00045 00046 simulated function SystemTick(float DeltaTime) 00047 { 00048 local int i; 00049 local vector X,Y,Z; 00050 00051 ElapsedTime += DeltaTime; 00052 00053 if(AttachParent.IsA('EffectSkeleton')) 00054 GetAxes(rotator(AttachParent.GetJointPos(3) - AttachParent.GetJointPos(2)), X, Y, Z); 00055 00056 for (i=0; i<ParticleCount; i++) 00057 { 00058 ParticleArray[i].Location = Location + 00059 (X * (Sin((ElapsedTime/2 + (i*Multiplier))) * HalfLength)) 00060 + (Y * (Cos((ElapsedTime + (i*Multiplier)) * MaxDeviation) * CircleRadius)) 00061 + (Z * (Sin((ElapsedTime + (i*Multiplier)) * MaxDeviation) * CircleRadius)); 00062 } 00063 } 00064 00065 defaultproperties 00066 { 00067 MaxDeviation=5.000000 00068 CircleRadius=15.000000 00069 HalfLength=30.000000 00070 Multiplier=0.100000 00071 ParticleCount=10 00072 ParticleTexture(0)=Texture'RuneFX.Spark1' 00073 ShapeVector=(X=8.000000,Y=8.000000,Z=2.000000) 00074 VelocityMin=(X=0.300000,Y=0.300000,Z=50.000000) 00075 VelocityMax=(X=2.500000,Y=2.500000,Z=120.000000) 00076 ScaleMin=0.150000 00077 ScaleMax=0.150000 00078 ScaleDeltaX=1.000000 00079 ScaleDeltaY=1.000000 00080 LifeSpanMin=999999.000000 00081 LifeSpanMax=999999.000000 00082 AlphaStart=10 00083 AlphaEnd=10 00084 bEventSystemInit=True 00085 bEventSystemTick=True 00086 RemoteRole=ROLE_SimulatedProxy 00087 bDirectional=True 00088 Style=STY_Translucent 00089 ScaleGlow=3.000000 00090 }