PDA

View Full Version : HUD Countdown Timer


t3hNox
06-20-2010, 10:43
Hi.
Is there any tutorial where is shown how to make a simple HUD countdown (with set_hudmessage and ShowSyncHudMsg)? I'd like to make a simple countdown timer and when it reaches 0 some function is called. The only possible way I can think of is with set_tasks which, I believe, is a bad way how to make such timer.

#8 SickneSS
06-20-2010, 12:09
Look at my WarmUP Mod

Alucard^
06-20-2010, 12:26
I don't think using task is a bad method for a countdown.... maybe is a bad method for a timer, yes but not for a simple countdown, i think.

Kreation
06-20-2010, 13:47
You could take a look at the Base Builder mod as well. He has a countdown on that.

wrecked_
06-20-2010, 13:49
https://forums.alliedmods.net/showthread.php?t=128819&highlight=timer

t3hNox
06-20-2010, 13:56
Thanks everyone. It seems that wrecked_ posted a more efficient method of this HUD countdown timer. Unfortunately I have already coded that timer using the way that is used in WarmUP mod.
Anyways, problem solved :)

Alucard^
06-20-2010, 16:24
But:

set_task(1.0, "Hello");

public Hello()
{
// stuff

set_task(1.0, "Hello");
}

set_task(1.0, "Hello", .flags="b");

public Hello()
{
// stuff
}

set_task(1.0, "Hello", .flags="a", TIMES);

public Hello()
{
// stuff
}

Are not the same things? Or some methods are more efficient than others?