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

SkaarjPack.Warlord


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
class Warlord extends Monster;

var bool bRocketDir;

function bool SameSpeciesAs(Pawn P)
{
    return ( (Monster(P) != None) && (P.IsA('Skaarj') || P.IsA('WarLord')) );
}

function PostBeginPlay()
{
    Super.PostBeginPlay();
    bMeleeFighter = (FRand() < 0.5);
}

function Step()
{
    PlaySound(sound'step1t', SLOT_Interact);
}

function Flap()
{
    PlaySound(sound'fly1WL', SLOT_Interact);
}

function SetMovementPhysics()
{
    SetPhysics(PHYS_Flying);
}

function bool Dodge(eDoubleClickDir DoubleClickMove)
{
    local vector X,Y,Z,duckdir;

    GetAxes(Rotation,X,Y,Z);
    if (DoubleClickMove == DCLICK_Forward)
        duckdir = X;
    else if (DoubleClickMove == DCLICK_Back)
        duckdir = -1*X; 
    else if (DoubleClickMove == DCLICK_Left)
        duckdir = Y; 
    else if (DoubleClickMove == DCLICK_Right)
        duckdir = -1*Y; 

    SetPhysics(PHYS_Flying);
    if ( !bShotAnim && (FRand() < 0.3) )
    {
        bShotAnim = true;
        SetAnimAction('FDodgeUp');
    }
    Controller.Destination = Location + 200 * duckDir;
    Velocity = AirSpeed * duckDir;
    Controller.GotoState('TacticalMove', 'DoMove');
    return true;
}   

event Landed(vector HitNormal)
{
    SetPhysics(PHYS_Walking);
    Super.Landed(HitNormal);
}

event HitWall( vector HitNormal, actor HitWall )
{
    if ( HitNormal.Z > MINFLOORZ )
        SetPhysics(PHYS_Walking);
    Super.HitWall(HitNormal,HitWall);
}

singular function Falling()
{
    SetPhysics(PHYS_Flying);
}

simulated function PlayDirectionalDeath(Vector HitLoc)
{
    if ( Physics == PHYS_Flying )
        PlayAnim('Dead2A');
    else
        PlayAnim('Dead1');
}

function PlayTakeHit(vector HitLocation, int Damage, class<DamageType> DamageType)
{
    if ( Damage > 50 )
        Super.PlayTakeHit(HitLocation,Damage,DamageType);
}

simulated function PlayDirectionalHit(Vector HitLoc)
{
    local name Anim;
    local float frame,rate;

    if ( bShotAnim )
        return;
        
    GetAnimParams(0, Anim,frame,rate);

    if ( Anim == 'FDodgeUp' )
        return;
    TweenAnim('TakeHit', 0.05);
}

function PlayVictory()
{
    SetPhysics(PHYS_Falling);
    Controller.bPreparingMove = true;
    Acceleration = vect(0,0,0);
    bShotAnim = true;
    PlaySound(sound'laugh1WL',SLOT_Interact);   
    SetAnimAction('Laugh');
    Controller.Destination = Location;
    Controller.GotoState('TacticalMove','WaitForAnim');
}

function RangedAttack(Actor A)
{
    if ( bShotAnim )
        return;
    
    if ( Physics == PHYS_Flying )
        SetAnimAction('FlyFire');
    else if ( VSize(A.Location - Location) < MeleeRange + CollisionRadius + A.CollisionRadius )
    {
        Controller.bPreparingMove = true;
        Acceleration = vect(0,0,0);
        SetAnimAction('Strike');
        if ( MeleeDamageTarget(45, (45000.0 * Normal(Controller.Target.Location - Location))) )
            PlaySound(sound'Threat1WL', SLOT_Talk); 
    }
    else if ( !Controller.bPreparingMove && Controller.InLatentExecution(Controller.LATENT_MOVETOWARD) )
    {
        SetPhysics(PHYS_Flying);
        SetAnimAction('FlyFire');
    }
    else
    {
        SetAnimAction('Fire');
        Controller.bPreparingMove = true;
        Acceleration = vect(0,0,0);
    }
    bShotAnim = true;
}

function vector GetFireStart(vector X, vector Y, vector Z)
{
    return Location + 0.5 * CollisionRadius * (X+Z-Y);
}

function FireProjectile()
{   
    local vector FireStart,X,Y,Z;
    local rotator ProjRot;
    local SeekingRocketProj S;
    if ( Controller != None )
    {
        GetAxes(Rotation,X,Y,Z);
        FireStart = GetFireStart(X,Y,Z);
        if ( !SavedFireProperties.bInitialized )
        {
            SavedFireProperties.AmmoClass = MyAmmo.Class;
            SavedFireProperties.ProjectileClass = MyAmmo.ProjectileClass;
            SavedFireProperties.WarnTargetPct = MyAmmo.WarnTargetPct;
            SavedFireProperties.MaxRange = MyAmmo.MaxRange;
            SavedFireProperties.bTossed = MyAmmo.bTossed;
            SavedFireProperties.bTrySplash = MyAmmo.bTrySplash;
            SavedFireProperties.bLeadTarget = MyAmmo.bLeadTarget;
            SavedFireProperties.bInstantHit = MyAmmo.bInstantHit;
            SavedFireProperties.bInitialized = true;
        }
        ProjRot = Controller.AdjustAim(SavedFireProperties,FireStart,600);
        if ( bRocketDir )
            ProjRot.Yaw += 3072; 
        else
            ProjRot.Yaw -= 3072; 
        bRocketDir = !bRocketDir;
        S = Spawn(class'WarlordRocket',,,FireStart,ProjRot);
        S.Seeking = Controller.Enemy;
        PlaySound(FireSound,SLOT_Interact);
    }
}

defaultproperties
{
     bMeleeFighter=Falsch
     bTryToWalk=Wahr
     bBoss=Wahr
     DodgeSkillAdjust=4.000000
     HitSound(0)=Sound'SkaarjPack_rc.WarLord.injur1WL'
     HitSound(1)=Sound'SkaarjPack_rc.WarLord.injur2WL'
     HitSound(2)=Sound'SkaarjPack_rc.WarLord.injur1WL'
     HitSound(3)=Sound'SkaarjPack_rc.WarLord.injur2WL'
     DeathSound(0)=Sound'SkaarjPack_rc.WarLord.DeathCry1WL'
     DeathSound(1)=Sound'SkaarjPack_rc.WarLord.DeathCry1WL'
     DeathSound(2)=Sound'SkaarjPack_rc.WarLord.DeathCry1WL'
     DeathSound(3)=Sound'SkaarjPack_rc.WarLord.DeathCry1WL'
     ChallengeSound(0)=Sound'SkaarjPack_rc.WarLord.acquire1WL'
     ChallengeSound(1)=Sound'SkaarjPack_rc.WarLord.roam1WL'
     ChallengeSound(2)=Sound'SkaarjPack_rc.WarLord.threat1WL'
     ChallengeSound(3)=Sound'SkaarjPack_rc.WarLord.breath1WL'
     FireSound=SoundGroup'WeaponSounds.RocketLauncher.RocketLauncherFire'
     AmmunitionClass=Class'SkaarjPack.WarlordAmmo'
     ScoringValue=10
     bCanFly=Wahr
     MeleeRange=80.000000
     GroundSpeed=400.000000
     AirSpeed=500.000000
     Health=500
     MovementAnims(1)="RunF"
     MovementAnims(2)="RunF"
     MovementAnims(3)="RunF"
     TurnLeftAnim="Idle_Rest"
     TurnRightAnim="Idle_Rest"
     WalkAnims(1)="WalkF"
     WalkAnims(2)="WalkF"
     WalkAnims(3)="WalkF"
     AirAnims(0)="Fly"
     AirAnims(1)="Fly"
     AirAnims(2)="Fly"
     AirAnims(3)="Fly"
     TakeoffAnims(0)="Fly"
     TakeoffAnims(1)="Fly"
     TakeoffAnims(2)="Fly"
     TakeoffAnims(3)="Fly"
     AirStillAnim="Fly"
     TakeoffStillAnim="Fly"
     Mesh=VertMesh'SkaarjPack_rc.WarlordM'
     Skins(0)=FinalBlend'SkaarjPackSkins.Skins.JWarlord1'
     Skins(1)=FinalBlend'SkaarjPackSkins.Skins.JWarlord1'
     TransientSoundVolume=1.000000
     TransientSoundRadius=1500.000000
     CollisionRadius=47.000000
     CollisionHeight=78.000000
     Mass=300.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:50.000 - Creation time: Mo 16.4.2007 11:20:57.343 - Created with UnCodeX