Core.Object | +--Engine.Actor | +--Engine.Projectile | +--UnrealI.KraalBolt
simulated
Explode(vector HitLocation, vector HitNormal)
void
MakeSound()
PostBeginPlay()
00001 //============================================================================= 00002 // KraalBolt. 00003 //============================================================================= 00004 class KraalBolt extends Projectile; 00005 00006 #exec AUDIO IMPORT FILE="Sounds\Krall\krasht2.wav" NAME="Krasht2" GROUP="Krall" 00007 00008 #exec MESH IMPORT MESH=Krallbm ANIVFILE=..\UnrealShare\MODELS\cros_t_a.3D DATAFILE=..\UnrealShare\MODELS\cros_t_d.3D X=0 Y=0 Z=0 00009 #exec MESH ORIGIN MESH=Krallbm X=0 Y=0 Z=0 YAW=-64 00010 #exec MESH SEQUENCE MESH=Krallbm SEQ=All STARTFRAME=0 NUMFRAMES=1 00011 #exec MESH SEQUENCE MESH=Krallbm SEQ=Still STARTFRAME=0 NUMFRAMES=1 00012 #exec MESHMAP SCALE MESHMAP=Krallbm X=0.04 Y=0.04 Z=0.08 00013 #exec OBJ LOAD FILE=..\UnrealShare\Textures\fireeffect1.utx PACKAGE=UNREALSHARE.Effect1 00014 #exec MESHMAP SETTEXTURE MESHMAP=Krallbm NUM=0 TEXTURE=UnrealShare.Effect1.FireEffect1a 00015 #exec MESHMAP SETTEXTURE MESHMAP=Krallbm NUM=1 TEXTURE=UnrealShare.Effect1.FireEffect1 00016 00017 function PostBeginPlay() 00018 { 00019 if ( ScriptedPawn(Instigator) != None ) 00020 Speed = ScriptedPawn(Instigator).ProjectileSpeed; 00021 Velocity = Vector(Rotation) * speed; 00022 PlaySound(SpawnSound,SLOT_None,4.0); 00023 Super.PostBeginPlay(); 00024 } 00025 00026 function MakeSound() 00027 { 00028 PlaySound(ImpactSound, SLOT_Interact); 00029 MakeNoise(1.0); 00030 } 00031 00032 simulated function Explode(vector HitLocation, vector HitNormal) 00033 { 00034 local SmokeColumn s; 00035 00036 MakeSound(); 00037 s = spawn(class'SmokeColumn',,,Location+Vect(0,0,38)); 00038 s.RemoteRole = ROLE_None; 00039 destroy(); 00040 } 00041 00042 00043 auto state Flying 00044 { 00045 simulated function ProcessTouch (Actor Other, Vector HitLocation) 00046 { 00047 local vector momentum; 00048 00049 if ( (Krall(Other) == None) && (KraalBolt(Other) == None)) 00050 { 00051 if ( Role == ROLE_Authority ) 00052 { 00053 momentum = MomentumTransfer * Normal(Velocity); 00054 Other.TakeDamage( Damage, instigator, HitLocation, momentum, 'zapped'); 00055 } 00056 Destroy(); 00057 } 00058 } 00059 00060 Begin: 00061 Sleep(7.0); //self destruct after 7.0 seconds 00062 Explode(Location, vect(0,0,0)); 00063 } 00064 00065 defaultproperties 00066 { 00067 speed=800.000000 00068 MaxSpeed=800.000000 00069 Damage=15.000000 00070 MomentumTransfer=10000 00071 SpawnSound=Sound'UnrealI.Krall.Krasht2' 00072 RemoteRole=ROLE_SimulatedProxy 00073 LifeSpan=7.500000 00074 Mesh=LodMesh'UnrealI.Krallbm' 00075 AmbientGlow=255 00076 bUnlit=True 00077 LightType=LT_Steady 00078 LightEffect=LE_NonIncidence 00079 LightBrightness=200 00080 LightHue=102 00081 LightRadius=4 00082 }