Post: Idea: health bar
02-17-2011, 09:46 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I know there have been other versions of this but i dont quite like em
I wany a black bar in the top right corner of the screen that say health in red glowing text here is what i have so far

if (self.maxhealth == 100) {
self.maxhealth = 1000;
self.health = (self.health * 10);

code = self createFontString( "objective", 2);
code setPoint( "TOPRIGHT", "RIGHT", 0, 0 );
while (1){
self.maxhealth = self.health;
code setText( "Health: " +self.health );
wait 0.05; }
}

so if you guys could just create a black bar and add that thid should be great
(adsbygoogle = window.adsbygoogle || []).push({});
02-17-2011, 09:59 PM #2
-Whiteboy-
┌∩┐ (◣◢Winky Winky┌∩┐
Originally posted by Sn1PaXx View Post
I know there have been other versions of this but i dont quite like em
I wany a black bar in the top right corner of the screen that say health in red glowing text here is what i have so far

if (self.maxhealth == 100) {
self.maxhealth = 1000;
self.health = (self.health * 10);

code = self createFontString( "objective", 2);
code setPoint( "TOPRIGHT", "RIGHT", 0, 0 );
while (1){
self.maxhealth = self.health;
code setText( "Health: " +self.health );
wait 0.05; }
}

so if you guys could just create a black bar and add that thid should be great


Ill tell you what i get told... learn from the coding

    health_hud()
{

self endon( "disconnect" );

x = 80;
y = 40;

self.health_bar = NewClientHudElem( self );
self.health_bar.x = x + 80;
self.health_bar.y = y + 2;
self.health_bar.alignX = "left";
self.health_bar.alignY = "top";
self.health_bar.horzAlign = "fullscreen";
self.health_bar.vertAlign = "fullscreen";
self.health_bar.alpha = 1;
self.health_bar.foreground = 1;
self.health_bar setshader( "black", 1, 8 );

self.health_text = NewClientHudElem( self );
self.health_text.x = x + 80;
self.health_text.y = y;
self.health_text.alignX = "left";
self.health_text.alignY = "top";
self.health_text.horzAlign = "fullscreen";
self.health_text.vertAlign = "fullscreen";
self.health_text.alpha = 1;
self.health_text.fontScale = 1;
self.health_text.foreground = 1;

for ( ;; )
{
wait ( 0.05 );

width = self.health / self.maxhealth * 300;
width = int( max( width, 1 ) );
self.health_bar setShader( "black", width, 8 );

self.health_text SetValue( self.health );
}
}
02-17-2011, 10:02 PM #3
dont have the time

just need the black bar only big enough to hold health:
02-17-2011, 10:03 PM #4
-Whiteboy-
┌∩┐ (◣◢Winky Winky┌∩┐
Originally posted by Sn1PaXx View Post
dont have the time

just need the black bar only big enough to hold health:


Well, from the looks of it i think its the shader...
02-17-2011, 10:07 PM #5
whatever . . .

ill figure it out later

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo