diff --git a/README.md b/README.md index 930606c2..2673ab5c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ * Start with semtex on maps that have semtex ## HUD -* Health bar displayed on bottom left of screen +* Health bar displayed on top center of screen * Current zone displayed on bottom left of screen ## Zombies diff --git a/_zm_reimagined.gsc b/_zm_reimagined.gsc index 05496e03..c0085b3b 100644 --- a/_zm_reimagined.gsc +++ b/_zm_reimagined.gsc @@ -201,13 +201,39 @@ health_bar_hud() flag_wait( "initial_blackscreen_passed" ); health_bar = self createprimaryprogressbar(); - health_bar setpoint(undefined, "BOTTOM_LEFT", 65, 17.5); + health_bar setpoint(undefined, "TOP", 0, -27.5); + health_bar.hidewheninmenu = 1; + health_bar.bar.hidewheninmenu = 1; + health_bar.barframe.hidewheninmenu = 1; health_bar_text = self createprimaryprogressbartext(); - health_bar_text setpoint(undefined, "BOTTOM_LEFT", 65, 5); + health_bar_text setpoint(undefined, "TOP", 0, -15); + health_bar_text.hidewheninmenu = 1; while (1) { + if (isDefined(self.e_afterlife_corpse)) + { + if (health_bar.alpha != 0) + { + health_bar.alpha = 0; + health_bar.bar.alpha = 0; + health_bar.barframe.alpha = 0; + health_bar_text.alpha = 0; + } + + wait 0.05; + continue; + } + + if (health_bar.alpha != 1) + { + health_bar.alpha = 1; + health_bar.bar.alpha = 1; + health_bar.barframe.alpha = 1; + health_bar_text.alpha = 1; + } + health_bar updatebar(self.health / self.maxhealth); health_bar_text settext(self.health);