AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HUD Countdown Timer (https://forums.alliedmods.net/showthread.php?t=130104)

t3hNox 06-20-2010 10:43

HUD Countdown Timer
 
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

Re: HUD Countdown Timer
 
Look at my WarmUP Mod

Alucard^ 06-20-2010 12:26

Re: HUD Countdown Timer
 
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

Re: HUD Countdown Timer
 
You could take a look at the Base Builder mod as well. He has a countdown on that.

wrecked_ 06-20-2010 13:49

Re: HUD Countdown Timer
 
https://forums.alliedmods.net/showth...ighlight=timer

t3hNox 06-20-2010 13:56

Re: HUD Countdown Timer
 
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

Re: HUD Countdown Timer
 
But:

Code:
set_task(1.0, "Hello"); public Hello() {     // stuff         set_task(1.0, "Hello"); }

Code:
set_task(1.0, "Hello", .flags="b"); public Hello() {     // stuff }

Code:
set_task(1.0, "Hello", .flags="a", TIMES); public Hello() {     // stuff }

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


All times are GMT -4. The time now is 14:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.