Mut Programming Question - Wave Count

  • 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/

Harpoma

FNG / Fresh Meat
Apr 25, 2010
6
0
0
I'm looking for a way to find out what round is currently underway and more specifically how many seconds have elapsed since the start of the round?

I've found Level.TimerSeconds but that is the number of seconds since the very beginning.

Is there an event I can grab onto to determine round start/end?


Any help would be greatly appreciated.

Thanks,
-=MDK=- HarpoMa
 

Marco

Active member
May 23, 2009
644
227
43
Finland
You can't directly check wave uptime from the game type, but you can time it yourself:
Code:
var KFGameType KF;
var int WaveTime;

function PostBeginPlay()
{
    KF = KFGameType(Level.Game);
    if( KF==None )
        Destroy();
    else SetTimer(1,true);
}
function Timer()
{
    if( KF.bWaveInProgress || KF.bWaveBossInProgress )
    {
        // Wave is in progress, time it.
        WaveTime++;
    }
    else WaveTime = 0; // Wave is down, reset timer.
}
As for current wave its: KF.WaveNum