Custom Hud Elements

Cdsand

L2: Junior Member
Oct 25, 2007
75
1
I'm working on an original game mode and was wondering if there was any way to make or modify existing HUD elements that I could attach to the map.

In my new mode, the players need to know the value of two math_count entities.

How can this be done?
 

nik

L12: Fabulous Member
Aug 14, 2009
987
564
No, HUDs are hard-coded into the game, I struggled with this a while back when creating Clearing. I did what you want to do, as the teams ticket values are both math_counters. I also published my prefab of the Conquest gamemode which can be found here.
 

Cdsand

L2: Junior Member
Oct 25, 2007
75
1
You struggled? Does that mean you eventually found a compromise solution or you didn't find anything?

I'm not sure what your game mode is.

EDIT: Downloaded the .vmf.

So, that's how it works. Seems easy enough.
 
Last edited:

nik

L12: Fabulous Member
Aug 14, 2009
987
564
That's really the only option to display the values onscreen. If you want to display them in a central location of the map, though, you could do something that looks a bit nicer, as game_texts can be somewhat ugly.
 

Cdsand

L2: Junior Member
Oct 25, 2007
75
1
I reverse engineered it to work on my map, but the one's place for Blu is missing.
I also get this when I compile your example .vmf.

What's up with that?
 

nik

L12: Fabulous Member
Aug 14, 2009
987
564
I can assure that none of the places are missing, unless I copied it wrong!! (DIS IZ BAD)

And what do you get? if you tried to post an image it didn't show up.