Core.Object | +--Engine.Actor | +--Engine.Projectile | +--UnrealShare.SkaarjProjectile
void
BeginState()
MakeSound()
00001 //============================================================================= 00002 // SkaarjProjectile. 00003 //============================================================================= 00004 class SkaarjProjectile extends Projectile; 00005 00006 #exec TEXTURE IMPORT NAME=ExplosionPal FILE=textures\exppal.pcx GROUP=Effects 00007 #exec OBJ LOAD FILE=textures\SkaarjP.utx PACKAGE=UnrealShare.SKEffect 00008 00009 #exec AUDIO IMPORT FILE="Sounds\Skaarj\skasht2.WAV" NAME="Skrjshot" GROUP="Skaarj" 00010 #exec AUDIO IMPORT FILE="Sounds\Skaarj\skaimp3.WAV" NAME="SkrjImp" GROUP="Skaarj" 00011 00012 auto state Flying 00013 { 00014 simulated function Timer() 00015 { 00016 Texture = Texture'Skj_a04'; 00017 } 00018 00019 simulated function ProcessTouch (Actor Other, Vector HitLocation) 00020 { 00021 local vector momentum; 00022 00023 if ( !Other.IsA('SkaarjWarrior') ) 00024 { 00025 if ( Role == ROLE_Authority ) 00026 { 00027 momentum = 10000.0 * Normal(Velocity); 00028 Other.TakeDamage(Damage, instigator, HitLocation, momentum, 'zapped'); 00029 } 00030 Destroy(); 00031 } 00032 } 00033 00034 function MakeSound() 00035 { 00036 PlaySound(ImpactSound); 00037 MakeNoise(1.0); 00038 } 00039 00040 simulated function Explode(vector HitLocation, vector HitNormal) 00041 { 00042 local EnergyBurst e; 00043 00044 MakeSound(); 00045 if ( Level.NetMode != NM_DedicatedServer ) 00046 { 00047 e = spawn(class 'EnergyBurst',,,HitLocation+HitNormal*9); 00048 e.RemoteRole = ROLE_None; 00049 } 00050 destroy(); 00051 } 00052 00053 function BeginState() 00054 { 00055 if ( ScriptedPawn(Instigator) != None ) 00056 Speed = ScriptedPawn(Instigator).ProjectileSpeed; 00057 Velocity = Vector(Rotation) * speed; 00058 PlaySound(SpawnSound); 00059 SetTimer(0.20,False); 00060 } 00061 00062 Begin: 00063 Sleep(7.0); //self destruct after 7.0 seconds 00064 Explode(Location, vect(0,0,0)); 00065 } 00066 00067 defaultproperties 00068 { 00069 speed=800.000000 00070 MaxSpeed=1200.000000 00071 Damage=16.000000 00072 SpawnSound=Sound'UnrealShare.Skaarj.Skrjshot' 00073 ImpactSound=Sound'UnrealShare.Skaarj.SkrjImp' 00074 RemoteRole=ROLE_SimulatedProxy 00075 LifeSpan=7.300000 00076 DrawType=DT_Sprite 00077 Style=STY_Translucent 00078 Texture=Texture'UnrealShare.SKEffect.Skj_a00' 00079 DrawScale=0.700000 00080 bUnlit=True 00081 LightType=LT_Steady 00082 LightEffect=LE_NonIncidence 00083 LightBrightness=149 00084 LightHue=165 00085 LightSaturation=186 00086 LightRadius=4 00087 }