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

UnrealI.Boulder1


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
//=============================================================================
// Boulder1.
//=============================================================================
class Boulder1 expands BigRock;

#exec MESH IMPORT MESH=boulderM ANIVFILE=..\UnrealShare\MODELS\rock_a.3D DATAFILE=..\UnrealShare\MODELS\rock_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=boulderM X=0 Y=0 Z=0 YAW=64
#exec MESH SEQUENCE MESH=boulderM SEQ=All  STARTFRAME=0  NUMFRAMES=4
#exec MESH SEQUENCE MESH=boulderM SEQ=Pos1  STARTFRAME=0   NUMFRAMES=1
#exec MESH SEQUENCE MESH=boulderM SEQ=Pos2  STARTFRAME=1   NUMFRAMES=1
#exec MESH SEQUENCE MESH=boulderM SEQ=Pos3  STARTFRAME=2   NUMFRAMES=1
#exec MESH SEQUENCE MESH=boulderM SEQ=Pos4  STARTFRAME=3   NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Jboulder1 FILE=..\UnrealShare\MODELS\rock.PCX GROUP=Skins
#exec MESHMAP SCALE MESHMAP=boulderM X=0.005 Y=0.005 Z=0.01
#exec MESHMAP SETTEXTURE MESHMAP=boulderM NUM=1 TEXTURE=Jboulder1

function SpawnChunks(int num)
{
    local int    NumChunks,i;
    local BigRock   TempRock;
    local float scale;

    NumChunks = 1+Rand(num);
    scale = 12 * sqrt(0.52/NumChunks);
    speed = VSize(Velocity);
    for (i=0; i<NumChunks; i++) 
    {
        TempRock = Spawn(class'BigRock');
        if (TempRock != None )
            TempRock.InitFrag(self, scale);
    }
    InitFrag(self, 0.5);
}

auto state Flying
{
    function HitWall (vector HitNormal, actor Wall)
    {
        Velocity = 0.75 * (Velocity - 2 * HitNormal * (Velocity Dot HitNormal));
        SetRotation(rotator(HitNormal));
        DrawScale *= 0.7;
        SpawnChunks(8);
        Destroy();
    }
}

defaultproperties
{
     speed=1300.000000
     MaxSpeed=1300.000000
     Mesh=Mesh'UnrealI.BoulderM'
     DrawScale=1.700000
     CollisionRadius=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.353 - Created with UnCodeX