RuneI
Class DarkDwarfLightning

source: c:\runehov\RuneI\Classes\DarkDwarfLightning.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.ParticleSystem
         |
         +--RuneI.BeamSystem
            |
            +--RuneI.DarkDwarfLightning
Direct Known Subclasses:None

class DarkDwarfLightning
extends RuneI.BeamSystem

//============================================================================= // DarkDwarfLightning. //=============================================================================

Function Summary
 void Trigger(Actor Other, Pawn EventInstigator)



Source Code


00001	//=============================================================================
00002	// DarkDwarfLightning.
00003	//=============================================================================
00004	class DarkDwarfLightning expands BeamSystem;
00005	
00006	
00007	function Trigger( Actor Other, Pawn EventInstigator )
00008	{
00009		local actor A;
00010	
00011		bHidden = false;
00012		AmbientSound=Sound'EnvironmentalSnd.SciFi.scifi02l';
00013	
00014		// Broadcast the Trigger message to all matching actors.
00015		if( Event != '' )
00016			foreach AllActors( class 'Actor', A, Event )
00017				A.Trigger(Other, Other.Instigator);
00018	}
00019	
00020	
00021	//=============================================================================
00022	//
00023	// SystemTick
00024	//
00025	// Called when the particle system is ticked IF bEventSystemTick is true
00026	//=============================================================================
00027	
00028	event SystemTick(float DeltaSeconds)
00029	{
00030		local int i;
00031		local vector v;
00032		local vector X, Y, Z;
00033		local float seglength;
00034			
00035		if(Target == None)
00036		{
00037			return;
00038		}
00039		
00040	//	BeamTime += DeltaSeconds;
00041	
00042		if(TargetJointIndex == 0)
00043		{	
00044			v = Target.Location - Location;
00045		}
00046		else
00047		{
00048			v = Target.GetJointPos(TargetJointIndex) - Location;
00049		}
00050		
00051		seglength = VSize(v) / (NumConPts-1);
00052		GetAxes(rotator(v), X, Y, Z);
00053	
00054		for(i = 1; i < NumConPts-1; i++)
00055		{
00056			ConnectionOffset[i] =
00057				X * ((FRand() - 0.5) * seglength * 0.5) +
00058				Y * ((FRand() - 0.5) * seglength * 0.5) +
00059				Z * ((FRand() - 0.5) * seglength * 0.5 );
00060		}
00061	}
00062	
00063	defaultproperties
00064	{
00065	     ParticleCount=45
00066	     ParticleTexture(0)=Texture'RuneFX.Beam2'
00067	     NumConPts=15
00068	     BeamThickness=2.500000
00069	     bHidden=True
00070	}

End Source Code