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

SkaarjPack.InvasionSquad


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
class InvasionSquad extends SquadAI;

var int IncomingWave;
var bool bHeavyAttack;

function NotifyKilled(Controller Killer, Controller Killed, pawn KilledPawn)
{
    local Bot B;
    local int i;
    local Monster P;

    if ( Killed == None )
        return;
        
    // if teammate killed, no need to update enemy list
    if ( (Team != None) && (Killed.PlayerReplicationInfo != None)
        && (Killed.PlayerReplicationInfo.Team == Team) )
    {
        if ( IsOnSquad(Killed) )
        {
            for ( B=SquadMembers; B!=None; B=B.NextSquadMember )
                if ( (B != Killed) && (B.Pawn != None) )
                {
                    B.SendMessage(None, 'OTHER', B.GetMessageIndex('MANDOWN'), 4, 'TEAM'); 
                    break;
                }
        }
        return;
    }
    RemoveEnemy(KilledPawn);

    B = Bot(Killer);
    if ( (B != None) && (B.Squad == self) && (B.Enemy == None) && (B.Pawn != None) )
    {
        // if no enemies left, area secure
        for ( i=0; i<8; i++ )
            if ( Enemies[i] != None )
                return;
        IncomingWave = 0;
        ForEach DynamicActors(class'Monster',P)
            if ( (P.Health > 0) && VSize(B.Pawn.Location - P.Location) < 3000 )
                return;
        B.SendMessage(None, 'OTHER', 11, 12, 'TEAM');
    }
}

defaultproperties
{
     IncomingWave=-1
}

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