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

UnrealShare.Barrel


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
//=============================================================================
// Barrel.
//=============================================================================
class Barrel expands 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=BarrelM ANIVFILE=MODELS\Barrel_a.3D DATAFILE=MODELS\Barrel_d.3D ZEROTEX=1
#exec MESH ORIGIN MESH=BarrelM X=320 Y=160 Z=95 YAW=64
#exec MESH SEQUENCE MESH=BarrelM SEQ=All    STARTFRAME=0   NUMFRAMES=1
#exec MESH SEQUENCE MESH=BarrelM SEQ=Still  STARTFRAME=0   NUMFRAMES=1
#exec TEXTURE IMPORT NAME=JBarrel1 FILE=MODELS\Barrel.PCX GROUP=Skins FLAGS=2
#exec MESHMAP SCALE MESHMAP=BarrelM X=0.15 Y=0.15 Z=0.3
#exec MESHMAP SETTEXTURE MESHMAP=BarrelM NUM=0 TEXTURE=JBarrel1


var() int Health;

Auto State Animate
{
    function HitWall (vector HitNormal, actor Wall)
    {
        if (Velocity.Z<-200) TakeDamage(100,Pawn(Owner),HitNormal,HitNormal*10000,'shattered'); 
        bBounce = False;
        Velocity = vect(0,0,0);
    }


    function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, 
                        Vector momentum, name damageType)
    {
        Instigator = InstigatedBy;
        bBobbing = false;
        if (Health<0) Return;
        if ( Instigator != None )
            MakeNoise(1.0);
        Health -= NDamage;
        if (Health <0)  
            Frag(class'WoodFragments',Momentum,1.75,12);        
        else 
        {
            SetPhysics(PHYS_Falling);
            bBounce = True;
            Momentum.Z = 1000;
            Velocity=Momentum*0.01;
        }
    }

Begin:
}

defaultproperties
{
     Health=10
     bPushable=True
     PushSound=Sound'UnrealShare.General.ObjectPush'
     EndPushSound=Sound'UnrealShare.General.Endpush'
     bStatic=False
     DrawType=DT_Mesh
     Skin=Texture'UnrealShare.Skins.JBarrel1'
     Mesh=Mesh'UnrealShare.BarrelM'
     CollisionRadius=24.000000
     CollisionHeight=29.000000
     bCollideActors=True
     bCollideWorld=True
     bBlockActors=True
     bBlockPlayers=True
     Mass=50.000000
     Buoyancy=60.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sun 21/2/2010 23:48:40.000 - Creation time: Sun 21/2/2010 23:49:51.150 - Created with UnCodeX