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

[TF2] Directly modify HUD elements


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blinx
Senior Member
Join Date: Oct 2013
Old 03-05-2019 , 21:49   [TF2] Directly modify HUD elements
Reply With Quote #1



I was wondering if it's possible to directly modify the two KOTH timers to not display time but just an ordinary int or float without the colon, but I don't know where I'd look to modify that, any ideas?
Blinx is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-06-2019 , 14:42   Re: [TF2] Directly modify HUD elements
Reply With Quote #2

I highly suspect that the client just reads from the networked properties on the two KOTH timer entities and then formats them into minutes and seconds.

Edit: The gamerules entity stores the entity refs of the two KOTH timers so they don't even need to be looked up by name.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 03-06-2019 at 14:54.
Powerlord is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-06-2019 , 16:41   Re: [TF2] Directly modify HUD elements
Reply With Quote #3

I don't think you can remove the colon, but you could pause the timers (the ones powerlord mentioned in the gamerules). Pause the timers then set them to what you want. Make sure no other entities are pointing to them though or it could override what you put in the timer.
For int values you could try changing the hudtype to CTF via the gamerules, expect weird results though.
Mitchell is offline
Blinx
Senior Member
Join Date: Oct 2013
Old 03-10-2019 , 00:24   Re: [TF2] Directly modify HUD elements
Reply With Quote #4

Thanks for the replies. I guess I'll just overly HUD elements on top of them.
Blinx is offline
Reply


Thread Tools
Display Modes

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 19:11.


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