UnrealI
Class WarlordRocket

source: e:\games\UnrealTournament\UnrealI\Classes\WarlordRocket.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--UnrealI.WarlordRocket
Direct Known Subclasses:None

class WarlordRocket
extends Engine.Projectile

//============================================================================= // WarlordRocket. //=============================================================================
Variables
 float Count,SmokeRate
 vector OriginalDirection

States
Flying

Function Summary
 void Explode(vector HitLocation, vector HitNormal)
 void Tick(float DeltaTime)


State Flying Function Summary
 void BeginState()
 void ProcessTouch(Actor Other, Vector HitLocation)
     
	{
		local vector EnemyDir;

		if ( (Instigator != None) && (Instigator.Enemy != None) )
		{
			EnemyDir = Normal(Instigator.Enemy.Location - Location);
			if ( (EnemyDir Dot OriginalDirection) > 0 )
			{
				Velocity =  speed * Normal(EnemyDir * speed * (0.25 + instigator.skill * 0.1) + Velocity);		
				SetRotation(Rotator(Velocity));
			}
		}
	}
*/
 void Timer()
     
/*	



Source Code


00001	//=============================================================================
00002	// WarlordRocket.
00003	//=============================================================================
00004	class WarlordRocket extends Projectile;
00005	
00006	#exec MESH IMPORT MESH=perock ANIVFILE=MODELS\perock_a.3D DATAFILE=MODELS\perock_d.3D X=0 Y=0 Z=0
00007	#exec MESH ORIGIN MESH=perock X=0 Y=0 Z=0 YAW=0 ROLL=0 PITCH=-64
00008	#exec MESH SEQUENCE MESH=perock SEQ=All       STARTFRAME=0   NUMFRAMES=16
00009	#exec MESH SEQUENCE MESH=perock SEQ=Ignite    STARTFRAME=0   NUMFRAMES=3
00010	#exec MESH SEQUENCE MESH=perock SEQ=Flying    STARTFRAME=3   NUMFRAMES=13
00011	#exec TEXTURE IMPORT NAME=Jpeace1 FILE=MODELS\peaceg.PCX
00012	#exec MESHMAP SCALE MESHMAP=perock  X=0.1 Y=0.1 Z=0.2
00013	#exec MESHMAP SETTEXTURE MESHMAP=perock NUM=1 TEXTURE=Jpeace1
00014	
00015	#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\General\8blfly2.WAV" NAME="BRocket" GROUP="General"
00016	
00017	var vector OriginalDirection;
00018	var float Count,SmokeRate;
00019	
00020	function Explode(vector HitLocation, vector HitNormal)
00021	{
00022		HurtRadius(damage, 200.0, 'exploded', MomentumTransfer, HitLocation);
00023		Spawn(class'SpriteBallExplosion', Pawn(Owner),,HitLocation);	
00024		Destroy();
00025	}
00026	
00027	
00028	function Tick(float DeltaTime)
00029	{
00030		local SpriteSmokePuff b;
00031	
00032		Count += DeltaTime;
00033		if ( (Count>(SmokeRate+FRand()*SmokeRate)) && (Level.NetMode!=NM_DedicatedServer) ) 
00034		{
00035			b = Spawn(class'SpriteSmokePuff');
00036			b.RemoteRole = ROLE_None;		
00037			Count=0.0;
00038		}
00039	}
00040	
00041	auto state Flying
00042	{
00043	
00044	/*	function Timer()
00045		{
00046			local vector EnemyDir;
00047	
00048			if ( (Instigator != None) && (Instigator.Enemy != None) )
00049			{
00050				EnemyDir = Normal(Instigator.Enemy.Location - Location);
00051				if ( (EnemyDir Dot OriginalDirection) > 0 )
00052				{
00053					Velocity =  speed * Normal(EnemyDir * speed * (0.25 + instigator.skill * 0.1) + Velocity);		
00054					SetRotation(Rotator(Velocity));
00055				}
00056			}
00057		}
00058	*/
00059		function ProcessTouch (Actor Other, Vector HitLocation)
00060		{
00061			if ((PeaceRocket(Other) == none) && (Other != Instigator) ) 
00062				Explode(HitLocation, vect(0,0,0));
00063		}
00064	
00065	
00066		function BeginState()
00067		{
00068			if (Level.bHighDetailMode) SmokeRate = 0.035;
00069			else SmokeRate = 0.15;	
00070			PlaySound(SpawnSound);
00071			OriginalDirection = Vector(Rotation);	
00072			Velocity = OriginalDirection * 500.0;
00073			Acceleration = Velocity * 0.4;	
00074			//SetTimer(0.1,True);
00075		}
00076	
00077	Begin:
00078		Sleep(7.0);
00079		Explode(Location, vect(0,0,0));
00080	}
00081	
00082	defaultproperties
00083	{
00084	     speed=1200.000000
00085	     MaxSpeed=1200.000000
00086	     Damage=60.000000
00087	     MomentumTransfer=50000
00088	     bNetTemporary=False
00089	     AmbientSound=Sound'UnrealI.General.BRocket'
00090	     Mesh=LodMesh'UnrealI.perock'
00091	     DrawScale=2.500000
00092	     AmbientGlow=1
00093	     bUnlit=True
00094	     SoundRadius=20
00095	     SoundVolume=255
00096	     bBounce=True
00097	}

End Source Code