1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-27 23:50:41 -05:00

Added health bar HUD

This commit is contained in:
Jbleezy
2020-03-08 20:06:40 -07:00
parent fcb4017a40
commit fda91a131f
2 changed files with 27 additions and 3 deletions

View File

@ -12,9 +12,6 @@
## Change Notes ## Change Notes
## HUD
* Current zone displayed on bottom left of screen
## Players ## Players
* Unlimited sprint * Unlimited sprint
* 100% backwards speed, strafe speed, and sprint strafe speed * 100% backwards speed, strafe speed, and sprint strafe speed
@ -22,6 +19,10 @@
* Can shoot when looking at other players * Can shoot when looking at other players
* Start with semtex on maps that have semtex * Start with semtex on maps that have semtex
## HUD
* Health bar displayed on bottom left of screen
* Current zone displayed on bottom left of screen
## Zombies ## Zombies
* Health capped at 1 million * Health capped at 1 million
* Removed walkers in high rounds * Removed walkers in high rounds

View File

@ -1,3 +1,4 @@
#include maps/mp/gametypes_zm/_hud_util;
#include maps/mp/zombies/_zm_utility; #include maps/mp/zombies/_zm_utility;
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
@ -48,6 +49,7 @@ onplayerspawned()
self tomb_give_shovel(); self tomb_give_shovel();
self thread health_bar_hud();
self thread zone_hud(); self thread zone_hud();
self thread on_equipment_placed(); self thread on_equipment_placed();
@ -190,6 +192,27 @@ enable_friendly_fire()
setDvar( "g_friendlyfireDist", "0" ); setDvar( "g_friendlyfireDist", "0" );
} }
health_bar_hud()
{
self endon("disconnect");
flag_wait( "initial_blackscreen_passed" );
health_bar = self createprimaryprogressbar();
health_bar setpoint(undefined, "BOTTOM_LEFT", 65, 17.5);
health_bar_text = self createprimaryprogressbartext();
health_bar_text setpoint(undefined, "BOTTOM_LEFT", 65, 5);
while (1)
{
health_bar updatebar(self.health / self.maxhealth);
health_bar_text settext(self.health);
wait 0.05;
}
}
zone_hud() zone_hud()
{ {
self endon("disconnect"); self endon("disconnect");