XIDMaps
Class USA02HelicoMissile

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

class USA02HelicoMissile
extends XIII.XIIIProjectile

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 ML3, ML4
 USA02HelicoMissileTrailEmitter MT
 bool bDestroyMT
 rotator rHit


Function Summary
 
simulated
Explode(vector HitLocation, vector HitNormal)
     
//_____________________________________________________________________________
 
simulated
PostBeginPlay()
     
//_____________________________________________________________________________
// Set up speed
 
simulated
ProcessTouch(Actor Other, Vector HitLocation)
     
//_____________________________________________________________________________
// Override ProcessTouch



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class USA02HelicoMissile extends XIIIProjectile;
00005	
00006	#exec OBJ LOAD FILE=XIIICine.utx PACKAGE=XIIICine
00007	
00008	var rotator rHit;
00009	var MovableLight ML1, ML2, ML3, ML4;
00010	var USA02HelicoMissileTrailEmitter MT;
00011	var bool bDestroyMT;
00012	
00013	//_____________________________________________________________________________
00014	// Set up speed
00015	simulated function PostBeginPlay()
00016	{
00017	    //Log("--> Spawn projectile"@self);
00018	    Super.PostBeginPlay();
00019	//    spawn(class'XIII.GrenadExplosionEmitter',,,Location);
00020	
00021	    ML1 = Spawn(class'MovableLight', self,, Location - vector(rotation) * 30.0);
00022	    ML1.SetRelativeLocation(vect(-30,0,0));
00023	    ML1.SetBase(self);
00024	    ML1.Texture = Texture'XIIICine.Hjaune04';
00025	    ML1.SetDrawScale(4.0);
00026	    ML1.Style = STY_Translucent;
00027	    ML1.bHidden = false;
00028	    ML1.bDynamicLight = True;
00029	
00030	    ML2 = Spawn(class'MovableLight', self,, Location - vector(rotation) * 60.0);
00031	    ML2.SetRelativeLocation(vect(-60,0,0));
00032	    ML2.SetBase(self);
00033	    ML2.Texture = Texture'XIIICine.Hred03';
00034	    ML2.SetDrawScale(5.0);
00035	    ML2.Style = STY_Translucent;
00036	    ML2.bHidden = false;
00037	    ML2.bDynamicLight = True;
00038	
00039	    ML3 = Spawn(class'MovableLight', self,, Location - vector(rotation) * 90.0);
00040	    ML3.SetRelativeLocation(vect(-90,0,0));
00041	    ML3.SetBase(self);
00042	    ML3.Texture = Texture'XIIICine.Hred03';
00043	    ML3.SetDrawScale(5.0);
00044	    ML3.Style = STY_Translucent;
00045	    ML3.bHidden = false;
00046	    ML3.bDynamicLight = True;
00047	
00048	    ML4 = Spawn(class'MovableLight', self,, Location - vector(rotation) * 120.0);
00049	    ML4.SetRelativeLocation(vect(-120,0,0));
00050	    ML4.SetBase(self);
00051	    ML4.Texture = Texture'XIIICine.Hred03';
00052	    ML4.SetDrawScale(3.0);
00053	    ML4.Style = STY_Translucent;
00054	    ML4.bHidden = false;
00055	    ML4.bDynamicLight = True;
00056	
00057	    MT = spawn(class'USA02HelicoMissileTrailEmitter', self);
00058	    MT.SetBase(Self);
00059	    MT.SetRelativeLocation(vect(0,0,0));
00060	    MT.SetRelativeRotation(rot(0,0,0));
00061	
00062		//Cho 30/04/03 : on diminue la vitesse de la roquette
00063	    Velocity = Vector(Rotation) * Speed*0.75;
00064	    SetTimer2(0.5, false);
00065	}
00066	
00067	//_____________________________________________________________________________
00068	simulated event Timer2()
00069	{
00070	    SetCollision(true,true,true);
00071	}
00072	
00073	//_____________________________________________________________________________
00074	simulated event Timer()
00075	{
00076	    if ( bDestroyMT )
00077	    {
00078	      MT.Destroy();
00079	      Destroy();
00080	    }
00081	    else
00082	    {
00083	      if ( bSpawnDecal && (ExplosionDecal != None) && (Level.NetMode != NM_DedicatedServer) )
00084	        Spawn(ExplosionDecal,self,,Location, rHit);
00085	      bDestroyMT = true;
00086	      SetTimer(1.1, false);
00087	    }
00088	}
00089	
00090	//_____________________________________________________________________________
00091	simulated function Explode(vector HitLocation, vector HitNormal)
00092	{
00093	    BlowUp(HitLocation);
00094	    if ( Level.NetMode != NM_DedicatedServer )
00095	    {
00096	      Spawn(class'BazookExplosionEmitter',,,HitLocation + HitNormal*50,rotator(HitNormal));
00097	    }
00098	    rHit = rotator(-HitNormal);
00099	    SetPhysics(PHYS_None);
00100	    Velocity = vect(0,0,0);
00101	    bHidden = true;
00102	    ML1.Destroy();
00103	    ML2.Destroy();
00104	    ML3.Destroy();
00105	    ML4.Destroy();
00106	/*
00107	    MT.AutoDestroy=true;
00108	    MT.AutoReset=false;
00109	*/
00110	    SetTimer(0.8, false);
00111	}
00112	
00113	//_____________________________________________________________________________
00114	// Override ProcessTouch
00115	simulated function ProcessTouch(Actor Other, Vector HitLocation)
00116	{
00117	    Instigator = Pawn(Owner);
00118	    Super.Processtouch(other, HitLocation);
00119	}
00120	
00121	
00122	
00123	defaultproperties
00124	{
00125	     hExploSound=Sound'XIIIsound.Explo__ExploBaz.ExploBaz__hExploBaz'
00126	     Speed=2000.000000
00127	     MaxSpeed=4000.000000
00128	     Damage=250.000000
00129	     DamageRadius=750.000000
00130	     MomentumTransfer=80000.000000
00131	     MyDamageType=Class'XIII.DTGrenaded'
00132	     ExplosionDecal=Class'XIII.BazookBlast'
00133	     bCollideActors=False
00134	     DrawType=DT_StaticMesh
00135	     LifeSpan=6.000000
00136	     StaticMesh=StaticMesh'Meshes_Vehicules.Missile'
00137	     SaturationDistance=600.000000
00138	     StabilisationDistance=3500.000000
00139	     StabilisationVolume=-10.000000
00140	}

End Source Code