Skip to content

[TF2] [HUD] Allow %MaxHealth% to be always shown #3815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
treacherousfiend opened this issue Feb 4, 2022 · 1 comment · May be fixed by ValveSoftware/source-sdk-2013#1222
Open

[TF2] [HUD] Allow %MaxHealth% to be always shown #3815

treacherousfiend opened this issue Feb 4, 2022 · 1 comment · May be fixed by ValveSoftware/source-sdk-2013#1222

Comments

@treacherousfiend
Copy link

Currently, the player's max health is only shown when they have lost 5 or more health.
This appears to be hardcoded by setting the value of %MaxHealth% to a null value.

I propose that instead of doing this, the game will simply hide the panel or call an animation which hides the panel when the player has not lost 5+ HP.

This would allow custom HUD makers a bit more freedom, including allowing them to have the max health be always shown.

@treacherousfiend treacherousfiend changed the title [TF2] [HUD] Allow %MaxHealth% to be used always [TF2] [HUD] Allow %MaxHealth% to be always shown Feb 4, 2022
@SirBlockles
Copy link

SirBlockles commented Dec 10, 2023

just encountered this today trying to make a hud with an old-school "HP / max" text display and was disappointed to see the max health refuse to show at full health. Could max health be made to work like the ammo display perhaps? for the ammo, the AmmoInClip and similar labels are hidden or shown specifically by their fieldname, which allows hud editors to create a custom label using the %Ammo% variable and have it not be controlled by the hard-coded hiding.

If the PlayerStatusMaxHealthValue element itself were set to be hidden rather than the value of %MaxHealth% being set to an empty string, it would accomplish the same hiding effect in the vanilla hud, while allowing hud creators to use the max health value freely in a custom label with a different name, and should be a pretty simple change to make code-wise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants