Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UPak.SpinnerProjectile


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
//=============================================================================
// SpinnerProjectile.
//=============================================================================
class SpinnerProjectile expands Projectile;

#exec AUDIO IMPORT FILE="Sounds\Spinner\Shoot2.wav"  NAME="Fire"   GROUP="Spinner"
#exec AUDIO IMPORT FILE="Sounds\Spinner\Impact3.wav" NAME="Hit"    GROUP="Spinner"

auto simulated state Flying
{
	simulated function ProcessTouch( Actor Other, Vector HitLocation )
	{
		if ( Spinner( Other ) == None )
		{
			if ( Role == ROLE_Authority )
				Explode( HitLocation, Normal(Velocity) );
			else Destroy();
		}
	}
	simulated function HitWall( vector HitNormal, actor Wall )
	{
		Explode( Location, HitNormal );
		if ( Level.NetMode != NM_DedicatedServer )
			Spawn(class'SpinnerAcid',,,Location, rotator(HitNormal));
	}
	function MakeSound()
	{
		if( Level.NetMode != NM_DedicatedServer )
			PlaySound( ImpactSound );
		MakeNoise( 1.0 );
	}
	simulated function Explode( vector HitLocation, vector HitNormal )
	{
		local EnergyBurst e;

		MakeSound();
		HurtRadius( Damage * DrawScale, 240 * DrawScale, 'corroded', MomentumTransfer * DrawScale, Location );
		if( Level.NetMode != NM_DedicatedServer )
		{
			e = spawn( class 'EnergyBurst', , , HitLocation + HitNormal * 9 );
			e.RemoteRole = ROLE_None;
		}
		Destroy();
	}

	simulated function BeginState()
	{
		if( ScriptedPawn( Instigator ) != None )
			Speed = ScriptedPawn( Instigator ).ProjectileSpeed;
		Velocity = Vector( Rotation ) * speed;
		Velocity.z += 200;  // Lob vertical component
		if( Level.NetMode != NM_DedicatedServer )
			PlaySound( SpawnSound );
		if( Region.zone.bWaterZone )
			Velocity *= 0.7;
	}

Begin:
	Sleep( LifeSpan - 0.3 ); //self destruct after 7.0 seconds
	Explode( Location, vect(0,0,0) );
}

defaultproperties
{
				speed=300.000000
				MaxSpeed=500.000000
				Damage=30.000000
				MomentumTransfer=20000
				SpawnSound=Sound'UPak.Spinner.Fire'
				ImpactSound=Sound'UPak.Spinner.Hit'
				Physics=PHYS_Falling
				RemoteRole=ROLE_SimulatedProxy
				LifeSpan=7.300000
				DrawType=DT_Sprite
				Style=STY_Translucent
				Texture=Texture'UPak.SpEffect.SpEffect.e8_a00'
				DrawScale=0.500000
				bUnlit=True
				LightType=LT_Steady
				LightEffect=LE_NonIncidence
				LightBrightness=149
				LightHue=165
				LightSaturation=186
				LightRadius=4
				bBounce=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:30.000 - Creation time: zo 11-11-2012 21:14:20.365 - Created with UnCodeX