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

UnrealI.EnergyBolt


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
//=============================================================================
// EnergyBolt.
//=============================================================================
class EnergyBolt extends Projectile;

#exec AUDIO IMPORT FILE="Sounds\EnergyBolt.wav" NAME="EnergyBolt"

#exec MESH IMPORT MESH=bolt1 ANIVFILE=..\UnrealShare\Models\bolt1_a.3d DATAFILE=..\UnrealShare\Models\bolt1_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=bolt1 X=0 Y=0 Z=-0 YAW=64
#exec MESH SEQUENCE MESH=bolt1 SEQ=All    STARTFRAME=0   NUMFRAMES=1
#exec MESH SEQUENCE MESH=bolt1 SEQ=Still  STARTFRAME=0   NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Jmisc1 FILE=..\UnrealShare\Models\misc.pcx
#exec MESHMAP SCALE MESHMAP=bolt1 X=0.05 Y=0.05 Z=0.1
#exec MESHMAP SETTEXTURE MESHMAP=bolt1 NUM=1 TEXTURE=Jmisc1



function PostBeginPlay()
{
	Super.PostBeginPlay();
	Acceleration = vect(0,0,0);
	Velocity = Vector(Rotation) * 600.0;
	PlaySound(SpawnSound,SLOT_None,4.0);
	SetLocation( Location + vect(0,0,25) );
}

function Explode(vector HitLocation, vector HitNormal)
{
	local SpriteSmokePuff s;

	if ( Level.NetMode != NM_DedicatedServer )
	{
		s = spawn(class'SpriteSmokePuff',,,HitLocation);
		s.RemoteRole = ROLE_None;
	}
	PlaySound(ImpactSound);
	destroy();
}

/////////////////////////////////////////////////////
auto state Flying
{
	function processTouch (Actor Other, vector HitLocation)
	{
		local int hitdamage;
		//log(Other.Class$" touched missile");

		if ( Other != instigator )
		{
			hitdamage = 10;
			Other.TakeDamage(hitdamage, instigator,Other.Location,
							 (1500.0 * float(hitdamage) * Normal(Velocity)), 'zapped' );
			Explode(Location, vect(0,0,0));
		}
	}

Begin:
	Sleep(7.0);
	Explode(Location, vect(0,0,0));
}

defaultproperties
{
				MaxSpeed=1000.000000
				SpawnSound=Sound'UnrealI.EnergyBolt'
				ExplosionDecal=Class'UnrealShare.KraalScorchRed'
				Mesh=LodMesh'UnrealShare.bolt1'
				AmbientGlow=67
				bUnlit=True
				LightType=LT_Steady
				LightRadius=9
}

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:18.490 - Created with UnCodeX