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

UnrealI.SludgeBarrel


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
00098
00099
00100
00101
//=============================================================================
// SludgeBarrel.
//=============================================================================
class SludgeBarrel extends Decoration;

#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\General\BPush1.wav" NAME="ObjectPush" GROUP="General"
#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\General\EndPush.wav" NAME="Endpush" GROUP="General"

#exec MESH IMPORT MESH=sbarrel ANIVFILE=Models\Oilbar_a.3d DATAFILE=Models\Oilbar_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=sbarrel X=0 Y=0 Z=-190 YAW=0
#exec MESH SEQUENCE MESH=sbarrel SEQ=All    STARTFRAME=0  NUMFRAMES=21
#exec MESH SEQUENCE MESH=sbarrel SEQ=Swirl  STARTFRAME=0  NUMFRAMES=21
#exec TEXTURE IMPORT NAME=Jsbarrel1 FILE=Models\oilbarel.pcx GROUP="Skins"
#exec MESHMAP SCALE MESHMAP=sbarrel X=0.05 Y=0.05 Z=0.1
#exec MESHMAP SETTEXTURE MESHMAP=sbarrel NUM=1 TEXTURE=Jsbarrel1


var() int Health;
var name DamageTypeb;

Auto State Animate
{
	singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation,
	Vector momentum, name damageType)
	{
		if (bStatic || bDeleteme)
			return;
		DamageTypeb = DamageType;
		Instigator = InstigatedBy;
		if (Health<0) Return;
		if ( Instigator != None )
			MakeNoise(1.0);
		Health -= NDamage;
		if (Health <0) 	GoToState('exploding');
		else
		{
			SetPhysics(PHYS_Falling);
			bBounce = True;
			Momentum.Z = 1000;
			Velocity=Momentum*0.01;
		}
	}


Begin:
	LoopAnim('swirl',0.4);
}

state exploding
{

	function Timer()
	{
		local int i;
		local BarrelSludge b;

		if (bStatic || bDeleteme)
			return;
		HurtRadius(200, 100, 'burned', 0, Location);
		SetCollision(False,False,False);
		for (i=0 ; i<int(FRand()*5+1) ; i++)
		{
			b = Spawn( class 'BarrelSludge',, '', Location + (vect(0,0,1.2)+VRand())*(70+FRand()*50));
			if ( b != None )
				b.DrawScale = FRand()+1.2;
		}
		Spawn(Class 'GreenSmokePuff');
		if (DamageTypeb == 'burned') skinnedFrag(class'Fragment1', texture'jSBarrel1', Vect(0,0,30000),1.0, 4);
		else  skinnedFrag(class'Fragment1', texture'jSBarrel1', Vect(0,0,30000),1.0, 12);
		Destroy();
	}

Begin:
	if (DamageTypeb != 'burned') Timer();
	else SetTimer(FRand()*0.4+0.1,False);
}

defaultproperties
{
				Health=2
				bPushable=True
				PushSound=Sound'UnrealI.General.ObjectPush'
				EndPushSound=Sound'UnrealI.General.Endpush'
				bStatic=False
				DrawType=DT_Mesh
				Mesh=LodMesh'UnrealI.sbarrel'
				AmbientGlow=96
				CollisionRadius=17.000000
				CollisionHeight=26.299999
				bCollideActors=True
				bCollideWorld=True
				bBlockActors=True
				bBlockPlayers=True
				LightType=LT_Steady
				LightEffect=LE_TorchWaver
				LightBrightness=64
				LightHue=88
				LightRadius=10
				Mass=100.000000
}

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.225 - Created with UnCodeX