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

UnrealShare.CrucifiedNali


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
//=============================================================================
// CrucifiedNali.
//=============================================================================
class CrucifiedNali expands NaliCarcass;

#exec MESH IMPORT MESH=CrossNali ANIVFILE=MODELS\nali_x.3D DATAFILE=MODELS\nali_d.3D X=0 Y=0 Z=0 ZEROTEX=1
#exec MESH ORIGIN MESH=CrossNali X=00 Y=-130 Z=30 YAW=64 ROLL=-64

#exec MESH SEQUENCE MESH=CrossNali SEQ=All      	STARTFRAME=0   NUMFRAMES=61
#exec MESH SEQUENCE MESH=CrossNali SEQ=HeadDown 	STARTFRAME=0   NUMFRAMES=20	RATE=15
#exec MESH SEQUENCE MESH=CrossNali SEQ=Writhe      	STARTFRAME=20  NUMFRAMES=30	RATE=15
#exec MESH SEQUENCE MESH=CrossNali SEQ=Dead1      	STARTFRAME=50  NUMFRAMES=1			
#exec MESH SEQUENCE MESH=CrossNali SEQ=Dead2      	STARTFRAME=51  NUMFRAMES=1
#exec MESH SEQUENCE MESH=CrossNali SEQ=Dead3      	STARTFRAME=52  NUMFRAMES=1
#exec MESH SEQUENCE MESH=CrossNali SEQ=Dead4      	STARTFRAME=53  NUMFRAMES=1
#exec MESH SEQUENCE MESH=CrossNali SEQ=Hang1      	STARTFRAME=54  NUMFRAMES=1			GROUP=Upright
#exec MESH SEQUENCE MESH=CrossNali SEQ=Hang2      	STARTFRAME=55  NUMFRAMES=1			GROUP=Upright
#exec MESH SEQUENCE MESH=CrossNali SEQ=Hang3      	STARTFRAME=56  NUMFRAMES=1			GROUP=Upright
#exec MESH SEQUENCE MESH=CrossNali SEQ=HangFeet    	STARTFRAME=57  NUMFRAMES=1			GROUP=Upright
#exec MESH SEQUENCE MESH=CrossNali SEQ=Impaled     	STARTFRAME=58  NUMFRAMES=1			GROUP=Upright
#exec MESH SEQUENCE MESH=CrossNali SEQ=Stocks      	STARTFRAME=59  NUMFRAMES=1			GROUP=Upright
#exec MESH SEQUENCE MESH=CrossNali SEQ=Stretch     	STARTFRAME=60  NUMFRAMES=1


#exec TEXTURE IMPORT NAME=JNali1 FILE=MODELS\nali.PCX GROUP=Skins 
#exec MESHMAP SCALE MESHMAP=crossnali X=0.072 Y=0.072 Z=0.144
#exec MESHMAP SETTEXTURE MESHMAP=crossnali NUM=0 TEXTURE=Jnali1

auto state Dying
{
    function AnimEnd()
    {
        if ( (AnimSequence == 'HeadDown') && (FRand() < 0.1) )
            PlayAnim('Writhe', 0.3 + 0.6 * FRand());
        else
            PlayAnim('HeadDown', 0.3 + 0.6 * FRand());
    }
    
    function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, 
                            Vector momentum, name damageType)
    {
        if ( (Damage > 40) || (momentum.Z/mass > 150) || (CumulativeDamage > 100) )
        {
            Velocity = momentum/Mass;
            ChunkUp(Damage);
        }
        else
        {
            CumulativeDamage += Damage;
            if ( CumulativeDamage > 40 )
            {
                Disable('AnimEnd');
                TweenAnim('HeadDown', 0.22);
            }
            else
                PlayAnim('Writhe', 0.7, 0.1);
        }
    }
    
Begin:
    if ( AnimSequence == 'HeadDown' )
    {
        SetCollision(true,true,true);
        PlayAnim('HeadDown');
    }
    else
    {
         if ( GetAnimGroup(AnimSequence) != 'Upright' )
            ReduceCylinder();
        bReducedHeight = true;
        GotoState('Dead');
    }
}

defaultproperties
{
     Physics=PHYS_None
     LifeSpan=0.000000
     AnimSequence=HeadDown
     Mesh=Mesh'UnrealShare.CrossNali'
}

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