RuneI
Class Electricity

source: c:\runehov\RuneI\Classes\Electricity.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.ParticleSystem
         |
         +--RuneI.BeamSystem
            |
            +--RuneI.Electricity
Direct Known Subclasses:DarkDwarfBolt, LightningPowerup

class Electricity
extends RuneI.BeamSystem

//============================================================================= // Electricity. //=============================================================================
Variables
 float amplitude


Source Code


00001	//=============================================================================
00002	// Electricity.
00003	//=============================================================================
00004	class Electricity expands BeamSystem;
00005	
00006	
00007	var float amplitude;
00008	
00009	
00010	//=============================================================================
00011	//
00012	// SystemTick
00013	//
00014	// Called when the particle system is ticked IF bEventSystemTick is true
00015	//=============================================================================
00016	event SystemTick(float DeltaSeconds)
00017	{
00018		local int i;
00019		local vector v;
00020		local vector X, Y, Z;
00021			
00022		if(Target == None)
00023			return;
00024	
00025		if(TargetJointIndex == 0)
00026		{	
00027			v = Target.Location - Location;
00028		}
00029		else
00030		{
00031			v = Target.GetJointPos(TargetJointIndex) - Location;
00032		}
00033		GetAxes(rotator(v), X, Y, Z);
00034		
00035		for(i = 1; i < NumConPts-1; i++)
00036		{
00037			ConnectionOffset[i] =
00038				X * ((FRand() - 0.5) * amplitude) +
00039				Y * ((FRand() - 0.5) * amplitude) +
00040				Z * ((FRand() - 0.5) * amplitude );
00041		}
00042	}
00043	
00044	defaultproperties
00045	{
00046	     Amplitude=5.000000
00047	     ParticleCount=24
00048	     ParticleTexture(0)=Texture'RuneFX.beam'
00049	     NumConPts=8
00050	     BeamThickness=1.500000
00051	}

End Source Code