Raised This Month: $51 Target: $400
 12% 

[TF2] Custom time using TF2s hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
foon
Member
Join Date: Dec 2018
Old 06-02-2019 , 13:28   [TF2] Custom time using TF2s hud
Reply With Quote #1

is it possible to use tf2s default hud for a timer (the one at the top of the screen)?
so idk if you can or not, but somehow override the waitingforplayers hud numbers and set my own countdown?
foon is offline
foon
Member
Join Date: Dec 2018
Old 06-11-2019 , 15:01   Re: [TF2] Custom time using TF2s hud
Reply With Quote #2

bump?
foon is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-11-2019 , 15:25   Re: [TF2] Custom time using TF2s hud
Reply With Quote #3

TF2's HUD gets its time from a CTeamRoundTimer / team_round_timer.

Sometimes these timers have specific names, such as for Waiting for Player and KOTH clocks, but other times they don't.

You can promote any timer to the HUD timer using the ShowInHUD input. The only catch I know of is that Arena mode doesn't allocate space for the timer unless you use SendConVarValue to send a fake value for the tf_arena_round_time cvar.

Edit: While PropHunt Redux isn't exactly the most well written plugin, you can look to see what it does with team_round_timer; it creates its own timer with setup time.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-11-2019 at 15:26.
Powerlord is offline
foon
Member
Join Date: Dec 2018
Old 06-14-2019 , 18:20   Re: [TF2] Custom time using TF2s hud
Reply With Quote #4

That worked, thanks!

I have one more question, is there any way you can add text under the timer (like when it says "waiting for players" or "overtime")? Or is that all clientside?
foon is offline
foon
Member
Join Date: Dec 2018
Old 06-17-2019 , 21:57   Re: [TF2] Custom time using TF2s hud
Reply With Quote #5

anyone?
foon is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:00.


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