VSH2-Devs / Vs-Saxton-Hale-2

VSH2 is a rewrite of the original VSH, meant to combine the best of VSH and FF2.
https://forums.alliedmods.net/showthread.php?t=286701
50 stars 15 forks source link

Suggestion regarding the Boss HUD #219

Open tsuza opened 2 years ago

tsuza commented 2 years ago

I'm not too keen on how it's being shown to the user right now. The HUD should give clear visual cues of the state of the boss to the user.


1 ) The charge of the super jump should be shown as a number with a min range of -100% and a max range of 100%. Example: If you put 25 as the maximum jump force, the player will see 25% as the maximum. The suggestion that I'm making is to round it up to 100% ( the same applies to when it's negative ).

My math is terrible, but the following code works:

float flJumpCharge = player.GetPropFloat("flCharge");

int iDisplayJumpCharge = flJumpCharge >= 0 ? RoundFloat(100.0 - (flMaxRange - flJumpCharge) / flMaxRange * 100.0) : RoundFloat(100.0 - (flMinRange + flJumpCharge) / flMinRange * 100.0);

You could also make it into:

float flJumpCharge = player.GetPropFloat("flCharge");

float flRange = flJumpCharge >= 0 ? flMaxRange : -flMinRange;

int iDisplayJumpCharge = RoundFloat(100.0 - (flRange  - flJumpCharge) / flRange * 100.0);

image

2 ) Change the color of the hud based on its state. For example, if the super jump is recharging it should be red. Why? So it's easier to tell when it's ready and when it's not. You know as soon as the hud becomes white that you can super jump. The same applies to the rage ( differently though, might be red when it's ready or a different color ). This one is tricky due to how HUDs work and the options we're given by VSH2. As far as I'm aware you can't have different colors in a single "Hud text", so in this case you would have to make an extra Handle so you can have two different ShowSyncHudText. Shouldn't HUD handles be managed by VSH2 though? The one we are free to utilize is PlayerHUD, which wouldn't be enough for this. So either make two separate HUD types for it or some way to let VSH2 manage it modularly... or just manage it ourselves.


These two suggestions have nothing to do with VSH2 itself ( apart from the second suggestion which would be adding an extra hud type to it ), but mainly the default bosses, plague and the template.