SFCharacter.SFCrawlerProjectile

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
//=============================================================================
// Spatial Fear
// Class: SFCrawlerProjectile
// Descripton: Projectile class, emitted by the crawler in ranged attack mode.
//				Should mimic a sonic wave.
//
// Author: Markus Nuebel
//=============================================================================
class SFCrawlerProjectile extends Projectile;


var float  ShockSize;

simulated function Tick( float DeltaTime )
{
	if ( Level.NetMode != NM_DedicatedServer )
	{
		ShockSize =  1.2 * (Default.LifeSpan - LifeSpan) + 1.0/(LifeSpan/Default.LifeSpan+0.05);
		ScaleGlow = Lifespan;
		AmbientGlow = ScaleGlow * 255;
		DrawScale = ShockSize;
	}
}


auto state Flying
{
	simulated function ProcessTouch (Actor Other, Vector HitLocation)
	{
		if (Other != instigator)
			Explode(HitLocation,Vect(0,0,0));
	}
	
	function BlowUp(vector HitLocation)
	{
		HurtRadius(damage, 50 + instigator.skill * 45, 'sonic', MomentumTransfer, HitLocation);
		MakeNoise(1.0);
		PlaySound(ImpactSound);
	}

	simulated function Explode(vector HitLocation, vector HitNormal)
	{
		//local SFB9WallHit s;
		local RingExplosion2 s;

		BlowUp(HitLocation);
		//s = spawn(class 'SFB9WallHit',,'',HitLocation+HitNormal*10 );
		s = spawn(class 'unrealshare.RingExplosion2',,'',HitLocation+HitNormal*10 );
		s.RemoteRole = ROLE_None;
		Destroy();
	}


	function SetUp()
	{
		PlaySound(SpawnSound);
		Velocity = Vector(Rotation) * speed;
		if ( ScriptedPawn(Instigator) != None )
			Speed = ScriptedPawn(Instigator).ProjectileSpeed;
	}

	simulated function BeginState()
	{
		SetUp();
	}

Begin:
}

defaultproperties
{
     speed=700.000000
     MaxSpeed=700.000000
     Damage=20.000000
     MomentumTransfer=50000
     SpawnSound=Sound'UnrealShare.Pickups.Invisible'
     ImpactSound=Sound'UnrealI.Cannon.CannonShot'
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=1.500000
     AmbientSound=Sound'UnrealShare.Pickups.HEALTH1'
     Style=STY_Translucent
     Texture=None
     Mesh=LodMesh'Botpack.ShockWavem'
     DrawScale=0.400000
     AmbientGlow=9
     bUnlit=True
     MultiSkins(1)=FireTexture'UnrealShare.Effect51.MyTex3'
     SoundRadius=15
     SoundVolume=255
     SoundPitch=73
     LightType=LT_Steady
     LightBrightness=154
     LightHue=24
     LightSaturation=207
     LightRadius=2
}

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:44 PM
Created with UnCodeX