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

UnrealShare.SteelBarrel


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
//=============================================================================
// SteelBarrel.
//=============================================================================
class SteelBarrel extends Decoration;

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

#exec MESH IMPORT MESH=steelbarrelM ANIVFILE=Models\steelb_a.3d DATAFILE=Models\steelb_d.3d X=0 Y=0 Z=0 ZEROTEX=1
#exec MESH ORIGIN MESH=steelbarrelM X=0 Y=0 Z=-20 YAW=0 ROLL=128
#exec MESH SEQUENCE MESH=steelbarrelM SEQ=All    STARTFRAME=0  NUMFRAMES=2
#exec MESH SEQUENCE MESH=steelbarrelM SEQ=Normal STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=steelbarrelM SEQ=Crush  STARTFRAME=1  NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Jsteelbarrel1 FILE=Models\steelb.pcx GROUP="Skins" Specular=1.0
#exec MESHMAP SCALE MESHMAP=steelbarrelM X=0.04 Y=0.04 Z=0.08
#exec MESHMAP SETTEXTURE MESHMAP=steelbarrelM NUM=0 TEXTURE=Jsteelbarrel1

var() int Health;

Auto State Animate
{

	function HitWall (vector HitNormal, actor Wall)
	{
		if (bDeleteme)
			return;
		if (bStatic )
		{
			SetPhysics(PHYS_None);
			bBounce = False;
			return;
		}
		if (VSize(Velocity)>200) PlayAnim('Crush');
		Velocity = 0.8*(( Velocity dot HitNormal ) * HitNormal * (-1.8 + FRand()*0.8) + Velocity);   // Reflect off Wall w/damping
		Velocity.Z = Velocity.Z*0.6;
		If (VSize(Velocity) < 5)
		{
			SetPhysics(PHYS_None);
			bBounce = False;
		}
	}

	function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation,
						 Vector momentum, name damageType)
	{
		if (bStatic || bDeleteme)
			return;
		SetPhysics(PHYS_Falling);
		bBounce = True;
		Momentum.Z = 1000;
		Velocity=Momentum*0.01;
	}


Begin:
	PlayAnim('normal');
}

defaultproperties
{
				Health=100
				bPushable=True
				PushSound=Sound'UnrealShare.General.ObjectPush'
				EndPushSound=Sound'UnrealShare.General.Endpush'
				bStatic=False
				DrawType=DT_Mesh
				Mesh=LodMesh'UnrealShare.steelbarrelM'
				CollisionRadius=14.000000
				CollisionHeight=23.500000
				bCollideActors=True
				bCollideWorld=True
				bBlockActors=True
				bBlockPlayers=True
				bProjTarget=True
				Mass=100.000000
				Buoyancy=1.000000
}

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