Core.Object | +--Engine.Actor | +--Engine.Projectile | +--UnrealShare.StingerProjectile
float
DelayTime
bool
bLighting
void
BeginState()
00001 //============================================================================= 00002 // StingerProjectile. 00003 //============================================================================= 00004 class StingerProjectile extends Projectile; 00005 00006 #exec MESH IMPORT MESH=TarydiumProjectile ANIVFILE=MODELS\aniv52.3D DATAFILE=MODELS\data52.3D X=0 Y=0 Z=0 00007 #exec MESH ORIGIN MESH=TarydiumProjectile X=0 Y=0 Z=0 YAW=64 00008 #exec MESH SEQUENCE MESH=TarydiumProjectile SEQ=All STARTFRAME=0 NUMFRAMES=1 00009 #exec TEXTURE IMPORT NAME=Tarydium1 FILE=MODELS\shells.PCX 00010 #exec MESHMAP SCALE MESHMAP=TarydiumProjectile X=0.015 Y=0.015 Z=0.03 00011 #exec MESHMAP SETTEXTURE MESHMAP=TarydiumProjectile NUM=4 TEXTURE=Tarydium1 00012 00013 #exec TEXTURE IMPORT NAME=ExplosionPal3 FILE=textures\expal2.pcx GROUP=Effects 00014 00015 #exec MESH IMPORT MESH=burst ANIVFILE=MODELS\burst_a.3D DATAFILE=MODELS\burst_d.3D X=0 Y=0 Z=0 ZEROTEX=1 00016 #exec MESH ORIGIN MESH=burst X=0 Y=0 Z=0 YAW=-64 00017 #exec MESH SEQUENCE MESH=burst SEQ=All STARTFRAME=0 NUMFRAMES=6 00018 #exec MESH SEQUENCE MESH=burst SEQ=Explo STARTFRAME=0 NUMFRAMES=6 00019 #exec TEXTURE IMPORT NAME=Jburst1 FILE=MODELS\burst.PCX GROUP=Skin 00020 #exec MESHMAP SCALE MESHMAP=burst X=0.2 Y=0.2 Z=0.4 YAW=128 00021 #exec MESHMAP SETTEXTURE MESHMAP=burst NUM=0 TEXTURE=Jburst1 00022 00023 #exec AUDIO IMPORT FILE="Sounds\stinger\Ricochet.WAV" NAME="Ricochet" GROUP="Stinger" 00024 #exec AUDIO IMPORT FILE="..\Unreali\Sounds\Razor\bladehit.wav" NAME="BladeHit" GROUP="RazorJack" 00025 00026 var bool bLighting; 00027 var float DelayTime; 00028 00029 ///////////////////////////////////////////////////// 00030 auto state Flying 00031 { 00032 simulated function ProcessTouch( Actor Other, Vector HitLocation ) 00033 { 00034 local int hitdamage; 00035 local vector hitDir; 00036 00037 if (Other != instigator && StingerProjectile(Other) == none) 00038 { 00039 if ( Role == ROLE_Authority ) 00040 { 00041 hitDir = Normal(Velocity); 00042 if ( FRand() < 0.2 ) 00043 hitDir *= 5; 00044 Other.TakeDamage(damage, instigator,HitLocation, 00045 (MomentumTransfer * hitDir), 'shot'); 00046 } 00047 Destroy(); 00048 } 00049 } 00050 00051 simulated function HitWall( vector HitNormal, actor Wall ) 00052 { 00053 Super.HitWall(HitNormal, Wall); 00054 if (FRand()<0.3) 00055 PlaySound(ImpactSound, SLOT_Misc, 0.5,,, 0.5+FRand()); 00056 else 00057 PlaySound(MiscSound, SLOT_Misc, 0.6,,,1.0); 00058 00059 MakeNoise(0.3); 00060 SetPhysics(PHYS_None); 00061 SetCollision(false,false,false); 00062 RemoteRole = ROLE_None; 00063 Mesh = mesh'Burst'; 00064 SetRotation( RotRand() ); 00065 PlayAnim ( 'Explo', 0.9 ); 00066 } 00067 00068 simulated function Timer() 00069 { 00070 local bubble1 b; 00071 if (Level.NetMode!=NM_DedicatedServer) 00072 { 00073 b=spawn(class'Bubble1'); 00074 b.DrawScale= 0.1 + FRand()*0.2; 00075 b.SetLocation(Location+FRand()*vect(2,0,0)+FRand()*Vect(0,2,0)+FRand()*Vect(0,0,2)); 00076 b.buoyancy = b.mass+(FRand()*0.4+0.1); 00077 } 00078 DelayTime+=FRand()*0.1+0.1; 00079 SetTimer(DelayTime,False); 00080 } 00081 00082 simulated function ZoneChange( Zoneinfo NewZone ) 00083 { 00084 if (NewZone.bWaterZone) 00085 { 00086 Velocity=0.7*Velocity; 00087 DelayTime=0.03; 00088 SetTimer(DelayTime,False); 00089 } 00090 } 00091 00092 function BeginState() 00093 { 00094 local rotator RandRot; 00095 00096 Velocity = Vector(Rotation) * speed; 00097 RandRot.Pitch = FRand() * 200 - 100; 00098 RandRot.Yaw = FRand() * 200 - 100; 00099 RandRot.Roll = FRand() * 200 - 100; 00100 Velocity = Velocity >> RandRot; 00101 if( Region.zone.bWaterZone ) 00102 Velocity=0.7*Velocity; 00103 } 00104 } 00105 00106 /////////////////////////////////////////////////////// 00107 simulated function Explode(vector HitLocation, vector HitNormal) 00108 { 00109 } 00110 00111 simulated function AnimEnd() 00112 { 00113 Destroy(); 00114 } 00115 00116 defaultproperties 00117 { 00118 speed=1600.000000 00119 Damage=14.000000 00120 MomentumTransfer=4000 00121 ImpactSound=Sound'UnrealShare.Stinger.Ricochet' 00122 MiscSound=Sound'UnrealShare.Razorjack.BladeHit' 00123 RemoteRole=ROLE_SimulatedProxy 00124 LifeSpan=6.000000 00125 AnimRate=1.000000 00126 Mesh=LodMesh'UnrealShare.TarydiumProjectile' 00127 AmbientGlow=215 00128 bUnlit=True 00129 bNoSmooth=True 00130 LightType=LT_Steady 00131 LightEffect=LE_NonIncidence 00132 LightBrightness=80 00133 LightHue=152 00134 LightSaturation=32 00135 LightRadius=5 00136 LightPeriod=50 00137 bBounce=True 00138 Mass=2.000000 00139 }