I'd like to have a time limit on my game, and i tried to get a timer counting down in my class that extends UTHUD like so:
And then the separate function..
local string timerText;
SetTimer(60, false, 'GameOverTimer'); //after a minute it'll be game over atm
Canvas.Font = class'Engine'.static.GetSmallFont();
//total time - current time = time remaining
timerText = "Remaining time: "$(string((GetTimerRate('GameOverTimer') - GetTimerCount('GameOverTimer'))));
While the text displays on screen as expected it does not countdown, it just stays at 60, also i've waited 60 seconds in the game and the "Game Over" text is not drawn.
Canvas.Font = class'Engine'.static.GetLargeFont();
I thought maybe the HUD wasn't the best place for a game over timer anyway and that perhaps it should be in the game type? but then i'm not sure how i would get the value from there and display it in the HUD..
I should probably mention that i've JUST started learning so my mistakes could be monumentally obvious, really appreciate any help you could give me.