XIII
Class HarponFlying

source: C:\XIII\XIII\Classes\HarponFlying.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--XIII.XIIIProjectile
            |
            +--XIII.HarponFlying
Direct Known Subclasses:None

class HarponFlying
extends XIII.XIIIProjectile

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 WaterTrailEmitter WTE


Function Summary
 
simulated
PostBeginPlay()
     
//_____________________________________________________________________________
// Set up speed
 
simulated
Timer()
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class HarponFlying extends XIIIProjectile;
00005	
00006	var WaterTrailEmitter WTE;
00007	
00008	//_____________________________________________________________________________
00009	// Set up speed
00010	simulated function PostBeginPlay()
00011	{
00012	    Super.PostBeginPlay();
00013	    Velocity = Vector(Rotation) * Speed;
00014	    SetTimer(0.5, false);
00015	    if ( PhysicsVolume.bWaterVolume )
00016	    {
00017	      WTE = Spawn(class'WaterTrailEmitter',self,, Location, Rotation);
00018	      WTE.SetBase(Self);
00019	    }
00020	    bSplashed = false;
00021	}
00022	
00023	//_____________________________________________________________________________
00024	simulated function Timer()
00025	{
00026	    SetPhysics(PHYS_Falling);
00027	}
00028	
00029	//_____________________________________________________________________________
00030	simulated event Destroyed()
00031	{
00032	    if ( (WTE != none) && (WTE.Emitters.Length > 0) )
00033	    {
00034	      WTE.Emitters[0].InitialParticlesPerSecond = 0;
00035	      WTE.SetBase(none);
00036	    }
00037	//      WTE.Destroy();
00038	    Super.Destroyed();
00039	}
00040	
00041	//_____________________________________________________________________________
00042	event PhysicsVolumeChange( PhysicsVolume NewVolume )
00043	{
00044	    if ( NewVolume.bWaterVolume && (WTE == none) )
00045	    {
00046	      WTE = Spawn(class'WaterTrailEmitter',self,, Location, Rotation);
00047	      WTE.SetBase(Self);
00048	    }
00049	    else if ( !NewVolume.bWaterVolume && (WTE != none) && (WTE.Emitters.Length > 0) )
00050	    {
00051	      WTE.Emitters[0].InitialParticlesPerSecond = 0;
00052	      WTE.SetBase(none);
00053	    }
00054	}
00055	
00056	
00057	// default bSplahed to true to prevent splash playing at underwater spawn
00058	
00059	
00060	defaultproperties
00061	{
00062	     bSpawnDecal=False
00063	     bSplashed=True
00064	     HitSoundType=3
00065	     aVisualImpact=Class'XIII.HarpoonInWall'
00066	     InHeadClass=Class'XIII.ProjectileInHead'
00067	     StaticMeshName="MeshArmesPickup.HarponIA"
00068	     Speed=2000.000000
00069	     MaxSpeed=4000.000000
00070	     Damage=100.000000
00071	     MomentumTransfer=10000.000000
00072	     MyDamageType=Class'XIII.DTPierced'
00073	     DrawType=DT_StaticMesh
00074	     LifeSpan=6.000000
00075	}

End Source Code