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

UnrealI.Titan


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
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
//=============================================================================
// Titan.
//=============================================================================
class Titan expands ScriptedPawn;

#exec MESH IMPORT MESH=Titan1 ANIVFILE=MODELS\titan_a.3D DATAFILE=MODELS\titand.3D X=0 Y=0 Z=0 ZEROTEX=1
#exec MESH ORIGIN MESH=Titan1 X=20 Y=-130 Z=-65 YAW=64 ROLL=-64

#exec MESH SEQUENCE MESH=titan1 SEQ=All       STARTFRAME=0   NUMFRAMES=300
#exec MESH SEQUENCE MESH=titan1 SEQ=TBrea001  STARTFRAME=0   NUMFRAMES=6   RATE=6
#exec MESH SEQUENCE MESH=titan1 SEQ=TChest    STARTFRAME=6   NUMFRAMES=28  RATE=15  Group=Attack
#exec MESH SEQUENCE MESH=titan1 SEQ=TDeat001  STARTFRAME=34  NUMFRAMES=29  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TDeat002  STARTFRAME=63  NUMFRAMES=18  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TDeat003  STARTFRAME=81  NUMFRAMES=18  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TFigh001  STARTFRAME=99  NUMFRAMES=8   RATE=6
#exec MESH SEQUENCE MESH=titan1 SEQ=TFist     STARTFRAME=107 NUMFRAMES=28  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TGetUp    STARTFRAME=135 NUMFRAMES=35  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TLeftUp   STARTFRAME=170 NUMFRAMES=1
#exec MESH SEQUENCE MESH=titan1 SEQ=TPunc001  STARTFRAME=171 NUMFRAMES=13  RATE=15  Group=Attack
#exec MESH SEQUENCE MESH=titan1 SEQ=TRightUp  STARTFRAME=184 NUMFRAMES=1
#exec MESH SEQUENCE MESH=titan1 SEQ=TSit      STARTFRAME=185 NUMFRAMES=1
#exec MESH SEQUENCE MESH=titan1 SEQ=TSlap001  STARTFRAME=186 NUMFRAMES=15  RATE=15  Group=Attack
#exec MESH SEQUENCE MESH=titan1 SEQ=TSnif001  STARTFRAME=201 NUMFRAMES=18  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TStom001  STARTFRAME=219 NUMFRAMES=18  RATE=15  Group=Attack
#exec MESH SEQUENCE MESH=titan1 SEQ=TThro001  STARTFRAME=237 NUMFRAMES=18  RATE=15  Group=Attack
#exec MESH SEQUENCE MESH=titan1 SEQ=TWalk001  STARTFRAME=255 NUMFRAMES=30  RATE=15
#exec MESH SEQUENCE MESH=titan1 SEQ=TShuffle  STARTFRAME=285 NUMFRAMES=15  RATE=15

#exec TEXTURE IMPORT NAME=Jtitan1 FILE=MODELS\titan.PCX GROUP=Skins  
#exec MESHMAP SCALE MESHMAP=titan1 X=0.3 Y=0.3 Z=0.6
#exec MESHMAP SETTEXTURE MESHMAP=titan1 NUM=0 TEXTURE=Jtitan1

#exec MESH NOTIFY MESH=titan1 SEQ=TWalk001 TIME=0.25 FUNCTION=FootStep
#exec MESH NOTIFY MESH=titan1 SEQ=TWalk001 TIME=0.75 FUNCTION=FootStep
#exec MESH NOTIFY MESH=titan1 SEQ=TWalk001 TIME=0.4  FUNCTION=StartMoving
#exec MESH NOTIFY MESH=titan1 SEQ=TWalk001 TIME=0.9  FUNCTION=StartMoving
#exec MESH NOTIFY MESH=titan1 SEQ=TStom001 TIME=0.4  FUNCTION=Stomp
#exec MESH NOTIFY MESH=titan1 SEQ=TSlap001 TIME=0.46 FUNCTION=SlapDamageTarget
#exec MESH NOTIFY MESH=titan1 SEQ=TPunc001 TIME=0.61 FUNCTION=PunchDamageTarget
#exec MESH NOTIFY MESH=titan1 SEQ=TThro001 TIME=0.75 FUNCTION=SpawnRock
#exec MESH NOTIFY MESH=titan1 SEQ=TDeat001 TIME=0.86 FUNCTION=LandThump
#exec MESH NOTIFY MESH=titan1 SEQ=TDeat002 TIME=0.61 FUNCTION=LandThump
#exec MESH NOTIFY MESH=titan1 SEQ=TDeat003 TIME=0.69 FUNCTION=LandThump

#exec AUDIO IMPORT FILE="Sounds\Titan\throw1a.WAV" NAME="Throw1t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\step1a.WAV" NAME="step1t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\stomp4a.WAV" NAME="stomp4t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\punch1Tt.WAV" NAME="punch1Ti" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\Swing1.WAV" NAME="Swing1t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\yell1a.WAV" NAME="yell1t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\yell2a.WAV" NAME="yell2t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\yell3a.WAV" NAME="yell3t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\death1a.WAV" NAME="death1t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\injur1a.WAV" NAME="injur1t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\injur2a.WAV" NAME="injur2t" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\amb1Ti.WAV" NAME="amb1Ti" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\sniff1Ti.WAV" NAME="sniff1Ti" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\fall1Ti.WAV" NAME="fall1Ti" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\slaphit1Ti.WAV" NAME="slaphit1Ti" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\roam1Ti.WAV" NAME="roam1Ti" GROUP="Titan"
#exec AUDIO IMPORT FILE="Sounds\Titan\chestB2Ti.WAV" NAME="chestB2Ti" GROUP="Titan"

//FIXME - use fall1ti for titancarcass landed

//TITAN variables;
var() byte SlapDamage,
    PunchDamage;
    
var bool bStomp;
var bool bLavaTitan;
var bool bEndFootStep;
var float realSpeed;
var() name StompEvent;
var() name StepEvent;
var(Sounds) sound Step;
var(Sounds) sound StompSound;
var(Sounds) sound slap;
var(Sounds) sound swing;
var(Sounds) sound throw;
var(Sounds) sound chest;

function PlayAcquisitionSound()
{
    if (Acquire != None) 
    {
        PlaySound(Acquire, SLOT_Talk,, true); 
        PlaySound(Acquire, SLOT_Misc,, true);
    } 
}

function PlayFearSound()
{
    if (Fear != None)
    {
        PlaySound(Fear, SLOT_Talk,, true); 
        PlaySound(Fear, SLOT_Misc,, true); 
    }
}

function PlayRoamingSound()
{
    if ( (Threaten != None) && (FRand() < 0.3) )
    {
        PlaySound(Threaten, SLOT_Talk,, true);
        PlaySound(Threaten, SLOT_Misc,, true);
        return;
    }
    if ( FRand() < 0.5 )
    {
        PlaySound(Sound'roam1Ti', SLOT_Talk,, true);
        PlaySound(Sound'roam1Ti', SLOT_Misc,, true);
        return;
    }
    if (Roam != None)
    {
        PlaySound(Roam, SLOT_Talk,, true);
        PlaySound(Roam, SLOT_Misc,, true);
    }
}

function PlayThreateningSound()
{
    if (Threaten == None) return;
    if (FRand() < 0.5)
    {
        PlaySound(Threaten, SLOT_Talk,, true);
        PlaySound(Threaten, SLOT_Misc,, true);
    }
    else
    {
        PlaySound(Fear, SLOT_Talk,, true);
        PlaySound(Fear, SLOT_Misc,, true);
    }
}

singular event BaseChange()
{
    local float decorMass;
    if (Pawn(Base) != None)
    {
        Base.TakeDamage( 1000, Self,Location,0.5 * Velocity , 'stomped');
        JumpOffPawn();
    }
    else if ( (Decoration(Base) != None) && (Velocity.Z < -400) )
    {
        decorMass = FMax(Decoration(Base).Mass, 1);
        Base.TakeDamage(1000, Self, Location, 0.5 * Velocity, 'stomped');
    }
}

function eAttitude AttitudeToCreature(Pawn Other)
{
    if ( Other.IsA('Titan') )
        return ATTITUDE_Friendly;
    else if ( Other.IsA('ScriptedPawn') )
        return ATTITUDE_Hate;
    else
        return ATTITUDE_Ignore;
}

function ThrowOther(Pawn Other)
{
    local float dist, shake;
    local PlayerPawn aPlayer;
    local vector Momentum;

    if ( Other.mass > 500 )
        return;

    aPlayer = PlayerPawn(Other);
    if ( aPlayer == None )
    {   
        if ( !bStomp || (Other.Physics != PHYS_Walking) )
            return;
        dist = VSize(Location - Other.Location);
        if (dist > 500)
            return;
    }
    else
    {
        dist = VSize(Location - Other.Location);
        shake = FMax(500, 1500 - dist);
        if ( dist > 1500 )
            return;
        aPlayer.ShakeView( FMax(0, 0.35 - dist/20000), shake, 0.015 * shake);
        if ( Other.Physics != PHYS_Walking )
            return;
    }

    Momentum = -0.5 * Other.Velocity + 100 * VRand();
    Momentum.Z =  7000000.0/((0.4 * dist + 350) * Other.Mass);
    if (bStomp)
        Momentum.Z *= 5.0;      
    Other.AddVelocity(Momentum);
}

function FootStep()
{
    local actor A;
    local pawn Thrown;
    //slightly throw player if nearby ,& play footstep sound
    bStomp = false;
    bEndFootstep = false;
    if (StepEvent != '')
        foreach AllActors( class 'Actor', A, StepEvent )
            A.Trigger( Self, Instigator );

    Thrown = Level.PawnList;
    While ( Thrown != None )
    {
        ThrowOther(Thrown);
        Thrown = Thrown.nextPawn;
    }
    
    realSpeed = DesiredSpeed; //fixme - don't stop if very low friction
    DesiredSpeed = 0.0;
    PlaySound(Step, SLOT_Interact);
}

function StartMoving()
{
    DesiredSpeed = realSpeed;
}

function Stomp()
{
    local actor A;
    local pawn Thrown;

    if (StompEvent != '')
        foreach AllActors( class 'Actor', A, StompEvent )
            A.Trigger( Self, Instigator );
            
    //throw all nearby creatures, and play sound
    bStomp = true;
    Thrown = Level.PawnList;
    While ( Thrown != None )
    {
        ThrowOther(Thrown);
        Thrown = Thrown.nextPawn;
    }
    PlaySound(Step, SLOT_Interact, 24);
}

function PlayWaiting()
{
    local float decision;
    local float animspeed;

    decision = FRand();
    animspeed = 0.2 + 0.5 * FRand();

    if (bEndFootStep)
        FootStep();
                
    if ( (AnimSequence == 'TBrea001') && (decision < 0.17) )
    {
        SetAlertness(0.0);
        if (decision < 0.1)
        {
            PlaySound(sound'sniff1Ti', SLOT_Talk);
            LoopAnim('TSnif001', animspeed);
        }
        else if (decision < 0.17)
            LoopAnim('TFist', animspeed);
    }
    else
    {
        SetAlertness(0.3);
        LoopAnim('TBrea001', animspeed);
    }
}
    
//PlayPatrolStop(), and PlayWaitingAmbush() all use PlayWaiting(); 			
function PlayPatrolStop()
{
    if (bEndFootStep)
        FootStep();
    DesiredSpeed = 0.0;
    PlayWaiting();
}

function PlayWaitingAmbush()
{
    if (bEndFootStep)
        FootStep();
    DesiredSpeed = 0.0;
    PlayWaiting();
}

function PlayChallenge()
{
    local float decision;

    if (bEndFootStep)
        FootStep();
    DesiredSpeed = 0.0;
    decision = FRand();

    if ( decision < 0.2 )
        PlayAnim('TStom001', 1.0, 0.2);
    else if ( decision < 0.4 )
        PlayAnim('TFist', 1.0, 0.2);
    else if ( decision < 0.64 )
        PlayAnim('TFigh001', 1.0, 0.2);
    else if ( decision < 0.75 )
    {
        PlaySound(Chest, SLOT_Interact);
        PlaySound(Chest, SLOT_Misc);
        PlayAnim('TChest', 1.0, 0.2);
    }
    else
        PlayAnim('TShuffle',1.0, 0.2);
}

function TweenToFighter(float tweentime)
{
    bEndFootStep = ( (AnimSequence == 'TWalk001') && (AnimFrame > 0.1) );   
    TweenAnim('TFigh001', tweentime);
}

function TweenToRunning(float tweentime)
{
    if ( (AnimSequence != 'TWalk001') || !bAnimLoop )
        TweenAnim('TWalk001', tweentime);
}

function TweenToWalking(float tweentime)
{
    TweenAnim('TWalk001', tweentime);
}

function TweenToWaiting(float tweentime)
{
    TweenAnim('TBrea001', tweentime);
}

function TweenToPatrolStop(float tweentime)
{
    TweenAnim('TBrea001', tweentime);
}

function PlayRunning()
{
    LoopAnim('TWalk001', -1.0/GroundSpeed,, 0.8);
}

function PlayWalking()
{
    LoopAnim('TWalk001', -1.0/GroundSpeed,, 0.8);
    if (FRand() < 0.4)
        PlayRoamingSound();
}

function PlayThreatening()
{
    local float decision, animspeed;

    decision = FRand();
    animspeed = 0.4 + 0.6 * FRand();

    if ( decision < 0.5 )
        PlayAnim('TBrea001', animspeed, 0.4);
    else if ( decision < 0.7 )
    {
        PlaySound(StompSound, SLOT_Talk);       
        PlaySound(StompSound, SLOT_Misc);       
        PlayAnim('TStom001', animspeed, 0.4);
    }
    else
    {
        PlayThreateningSound();
        if ( decision < 0.9 )
            PlayAnim('TFist', animspeed, 0.4);
        else
            TweenAnim('TFigh001', 0.4);
    }
}

function PlayTurning()
{
    if (bEndFootStep)
        FootStep();
    DesiredSpeed = 0.0;
    LoopAnim('TShuffle',, 0.15);
}

function PlayDying(name DamageType, vector HitLocation)
{
    local float decision;
    Decision = FRand();
    if (Decision < 0.4)
        PlayAnim('TDeat001', 0.7, 0.15);
    else if (Decision < 0.7)
        PlayAnim('TDeat002', 0.7, 0.15);
    else
        PlayAnim('TDeat003', 0.7, 0.15);
    
    PlaySound(Die, SLOT_Talk);  
    PlaySound(Die, SLOT_Misc);  
}

function PlayTakeHit(float tweentime, vector HitLoc, int Damage)
{
    local float decision;
    Decision = FRand();
    if (Decision < 0.4)
        TweenAnim('TDeat001', tweentime);
    else if (Decision < 0.7)
        TweenAnim('TDeat002', tweentime);
    else
        TweenAnim('TDeat003', tweentime);
}

function SpawnRock()
{
    local Projectile Proj;
    local vector X,Y,Z, projStart;
    GetAxes(Rotation,X,Y,Z);
    
    MakeNoise(1.0);
    if (FRand() < 0.4)
    {
        projStart = Location + CollisionRadius * X + 0.4 * CollisionHeight * Z;
        Proj = spawn(class 'Boulder1' ,self,'',projStart,AdjustAim(1000, projStart, 400, false, true));
        if( Proj != None )
            Proj.SetPhysics(PHYS_Projectile);
        return;
    }
    
    projStart = Location + CollisionRadius * X + 0.4 * CollisionHeight * Z;
    Proj = spawn(class 'BigRock' ,self,'',projStart,AdjustAim(1000, projStart, 400, false, true));
    if( Proj != None )
        Proj.SetPhysics(PHYS_Projectile);

    projStart = Location + CollisionRadius * X -  40 * Y + 0.4 * CollisionHeight * Z;
    Proj = spawn(class 'BigRock' ,self,'',projStart,AdjustAim(1000, projStart, 400, true, true));
    if( Proj != None )
        Proj.SetPhysics(PHYS_Projectile);

    if (FRand() < 0.2 * skill)
    {
        projStart = Location + CollisionRadius * X + 40 * Y + 0.4 * CollisionHeight * Z;
        Proj = spawn(class 'BigRock' ,self,'',projStart,AdjustAim(1000, projStart, 2000, false, true));
        if( Proj != None )
            Proj.SetPhysics(PHYS_Projectile);
    }
}

function PlayVictoryDance()
{
    if (bEndFootStep)
        FootStep();
    DesiredSpeed = 0.0;
    PlayAnim('TStom001', 0.6, 0.2); //gib the enemy here!
    PlaySound(StompSound, SLOT_Talk);       
    PlaySound(StompSound, SLOT_Misc);       
}

function PunchDamageTarget()
{
    if ( MeleeDamageTarget(PunchDamage, (70000.0 * (Normal(Target.Location - Location)))) )
    {
        PlaySound(Slap, SLOT_Interact);
        PlaySound(Slap, SLOT_Misc);
    }
}

function SlapDamageTarget()
{
    local vector X,Y,Z;
    GetAxes(Rotation,X,Y,Z);
    
    if ( MeleeDamageTarget(SlapDamage, (70000.0 * ( Y + vect(0,0,1)))) )
    {
        PlaySound(Slap, SLOT_Interact);
        PlaySound(Slap, SLOT_Misc);
    }
}

//Titan doesn't need to face as directly
function bool NeedToTurn(vector targ)
{
    local int YawErr;

    DesiredRotation = rotator(targ - location);
    DesiredRotation.Yaw = DesiredRotation.Yaw & 65535;
    YawErr = (DesiredRotation.Yaw - (Rotation.Yaw & 65535)) & 65535;
    if ( (YawErr < 8000) || (YawErr > 57535) )
        return false;

    return true;
}
    
function PlayMeleeAttack()
{
    if (bEndFootStep)
        FootStep();
    if (FRand() < 0.45)
    {
        PlaySound(sound'Punch1Ti', SLOT_Interact);          
        PlaySound(sound'Punch1Ti', SLOT_Misc);          
        PlayAnim('TPunc001');
    }
    else
    { 
        PlaySound(swing, SLOT_Interact);            
        PlaySound(swing, SLOT_Misc);            
        PlayAnim('TSlap001'); 
    }
}

function PlayRangedAttack()
{
    ////log("Play ranged attack");
    if ( bEndFootStep )
        FootStep();
    if ( (AnimSequence == 'TStom001') || (FRand() < 0.7) )
    {
        PlaySound(Throw, SLOT_Interact);
        PlayAnim('TThro001');
    }
    else
    {
        PlayAnim('TStom001'); 
        PlaySound(StompSound, SLOT_Talk);           
        PlaySound(StompSound, SLOT_Misc);           
    }
}

function ZoneChange(ZoneInfo newZone)
{
    if ( newZone.bPainZone && (newZone.DamageType == 'burned') )
        GotoState('LavaDeath');
    else
        Super.ZoneChange(newZone);
}

state Sitting
{
    ignores SeePlayer, HearNoise, Bump, TakeDamage;

    function Trigger( actor Other, pawn EventInstigator )
    {
        if ( EventInstigator.bIsPlayer )
        {
            AttitudeToPlayer = ATTITUDE_Hate;
            Enemy = EventInstigator;
            GotoState('Sitting', 'GetUp');
        }
        Disable('Trigger');
    }
    
    function BeginState()
    {
        bProjTarget = false;
    }

GetUp:
    bProjTarget = true;
    PlayAnim('TGetUp');
    FinishAnim();
    SetCollisionSize(0, Default.CollisionHeight);
    SetPhysics(PHYS_Walking);
    DesiredSpeed = 1.0;
    Acceleration = vector(Rotation) * AccelRate;
    PlayAnim('TWalk001');
    FinishAnim();
    SetCollisionSize(Default.CollisionRadius, Default.CollisionHeight);
    GotoState('Attacking');
    
Begin:
    TweenAnim('TSit', 0.05);
    SetPhysics(PHYS_None);
}


state WalkOut
{
    ignores SeePlayer, HearNoise, Bump, TakeDamage;

    function Trigger( actor Other, pawn EventInstigator )
    {
        if ( EventInstigator.bIsPlayer )
        {
            AttitudeToPlayer = ATTITUDE_Hate;
            Enemy = EventInstigator;
            GotoState('WalkOut', 'Walk');
        }
        Disable('Trigger');
    }
    
    function BeginState()
    {
        bProjTarget = false;
    }

Walk:
    bProjTarget = true;
    SetPhysics(PHYS_Walking);
    DesiredSpeed = 1.0;
    Acceleration = vector(Rotation) * AccelRate;
    PlayAnim('TWalk001');
    FinishAnim();
    PlayAnim('TWalk001');
    FinishAnim();
    GotoState('Attacking');
    
Begin:
    TweenAnim('TWalk001', 0.05);
    SetPhysics(PHYS_None);
}

state LavaDeath
{
    ignores SeePlayer, HearNoise, Bump, TakeDamage;
    
Begin:
    ReducedDamageType = 'Burned';
    Acceleration = vect(0,0,0);
    PlaySound(Chest, SLOT_Interact);
    PlayAnim('TChest');
    FinishAnim();
    PlayAnim('TDeat002');
    FinishAnim();
    bLavaTitan = true;
    TweenAnim('TDeat001', 2.0);
    GotoState('Attacking');
}

defaultproperties
{
     SlapDamage=85
     PunchDamage=80
     step=Sound'UnrealI.Titan.step1t'
     StompSound=Sound'UnrealI.Titan.stomp4t'
     Slap=Sound'UnrealI.Titan.slaphit1Ti'
     Swing=Sound'UnrealI.Titan.Swing1t'
     Throw=Sound'UnrealI.Titan.Throw1t'
     Chest=Sound'UnrealI.Titan.chestB2Ti'
     Aggressiveness=8.000000
     RefireRate=0.600000
     WalkingSpeed=0.750000
     bHasRangedAttack=True
     bIsBoss=True
     Acquire=Sound'UnrealI.Titan.yell1t'
     Fear=Sound'UnrealI.Titan.yell2t'
     Roam=Sound'UnrealI.Titan.yell3t'
     Threaten=Sound'UnrealI.Titan.yell2t'
     MeleeRange=140.000000
     GroundSpeed=400.000000
     AirSpeed=400.000000
     AccelRate=1000.000000
     JumpZ=-1.000000
     Visibility=255
     Health=1800
     ReducedDamageType=exploded
     ReducedDamagePct=0.300000
     Intelligence=BRAINS_REPTILE
     HitSound1=Sound'UnrealI.Titan.injur1t'
     HitSound2=Sound'UnrealI.Titan.injur2t'
     Land=Sound'UnrealI.Titan.stomp4t'
     Die=Sound'UnrealI.Titan.death1t'
     CombatStyle=0.850000
     DrawType=DT_Mesh
     Mesh=Mesh'UnrealI.Titan1'
     SoundRadius=32
     SoundVolume=250
     AmbientSound=Sound'UnrealI.Titan.amb1Ti'
     TransientSoundVolume=20.000000
     CollisionRadius=115.000000
     CollisionHeight=110.000000
     Mass=2000.000000
     RotationRate=(Pitch=0,Yaw=30000,Roll=0)
}

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:53.973 - Created with UnCodeX