• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [help] Bot AI

in the Controller Class of the bots there is a function:

Code:
state Healing
{
Begin:
    SwitchToBestWeapon();
    WaitForLanding();

KeepMoving:
    if( InjuredAlly==none || InjuredAlly.Health<=0 || InjuredAlly.Health>=90 )
    {
        LastHealTime = Level.TimeSeconds+1.f;
        [COLOR=DarkOrange]WhatToDoNext([COLOR=Red]150[/COLOR]);[/COLOR]
    }

    if( Enemy==none || VSizeSquared(Pawn.Location-InjuredAlly.Location)<VSizeSquared(Pawn.Location-Enemy.Location) )
        ClientSetWeapon(class'Syringe');

    if( Enemy!=None && VSizeSquared(Enemy.Location-Pawn.Location)<4000000.f && LineOfSightTo(Enemy) )
    {
        LastHealTime = Level.TimeSeconds+6.f;
        [COLOR=DarkOrange]WhatToDoNext([COLOR=Red]152[/COLOR]);[/COLOR]
    }

    MoveTarget = FindPathToward(InjuredAlly);

    if(MoveTarget!=none)
        MoveToward(MoveTarget,FaceActor(1),,false );
    else
    {
        LastHealTime = Level.TimeSeconds+2.f;
        [COLOR=DarkOrange]WhatToDoNext([COLOR=Red]151[/COLOR]);[/COLOR]
    }

    if( MySyringe==none )
    {
        FindMySyringe();
        if( MySyringe==none )
        {
            LastHealTime = Level.TimeSeconds+6.f;
            [COLOR=DarkOrange]WhatToDoNext([COLOR=Red]156[/COLOR]);[/COLOR]
        }
    }
    else if( MySyringe.ChargeBar()<0.5f )
    {
        LastHealTime = Level.TimeSeconds+2.f;
        [COLOR=DarkOrange]WhatToDoNext([COLOR=Red]153[/COLOR]);[/COLOR]
    }
    GoTo'KeepMoving';
}

when i look up the function i dont find what the number is used for

Code:
function WhatToDoNext(byte [COLOR=DarkOrange]CallingByte[/COLOR])
{
    //if ( ChoosingAttackLevel > 0 )
    //    log("CHOOSEATTACKAGAIN in state "$GetStateName()$" enemy "$GetEnemyName()$" old enemy "$GetOldEnemyName()$" CALLING BYTE "$[COLOR=DarkOrange]CallingByte[/COLOR]);

    if ( ChooseAttackTime == Level.TimeSeconds )
    {
        ChooseAttackCounter++;
        if ( ChooseAttackCounter > 3 )
            log("CHOOSEATTACKSERIAL in state "$GetStateName()$" enemy "$GetEnemyName()$" old enemy "$GetOldEnemyName()$" CALLING BYTE "$[COLOR=DarkOrange]CallingByte[/COLOR]);
    }
    else
    {
        ChooseAttackTime = Level.TimeSeconds;
        ChooseAttackCounter = 0;
    }
    OldEnemy = Enemy;
    ChoosingAttackLevel++;
    ExecuteWhatToDoNext();
    ChoosingAttackLevel--;
    RetaskTime = 0;
}

so all i see is that its used for the log
anyone knows what it does or if its used for something i dont see?