ID:266652
 
OK,this is pissing me off.I've kept trying and trying,but I can't get the HUD on the screen showing the usrs health in a bar.How in the world would I do that?Thanks for reading.

-Kappa the Imp
Kappa the Imp wrote:
OK,this is pissing me off.I've kept trying and trying,but I can't get the HUD on the screen showing the usrs health in a bar.How in the world would I do that?Thanks for reading.

What code are you using to do this? If you could show us how you programmed the health bar, and the code used to update it as health changes, we can help you debug it.

I can tell you a few things right off the bat that could screw it up--there are plenty of things that could go wrong, so don't feel bad if you're having a little trouble. Any of these are possible:

  • The health bar isn't being added to client.screen
  • The health bar's screen_loc is wrong (or null)
  • The health bar's icon is null or its icon_state points to a nonexistent state (if the default icon is blank, this could happen)
  • The health bar's layer is too low (try setting layer=FLY_LAYER)
  • The health bar is never being updated to show the current health

    If you don't see any of those problems in your code, then post the relevant sections here and I'll take a look.

    Lummox JR
In response to Lummox JR
Lummox JR wrote:
Kappa the Imp wrote:
OK,this is pissing me off.I've kept trying and trying,but I can't get the HUD on the screen showing the usrs health in a bar.How in the world would I do that?Thanks for reading.

What code are you using to do this? If you could show us how you programmed the health bar, and the code used to update it as health changes, we can help you debug it.

I can tell you a few things right off the bat that could screw it up--there are plenty of things that could go wrong, so don't feel bad if you're having a little trouble. Any of these are possible:

  • The health bar isn't being added to client.screen
  • The health bar's screen_loc is wrong (or null)
  • The health bar's icon is null or its icon_state points to a nonexistent state (if the default icon is blank, this could happen)
  • The health bar's layer is too low (try setting layer=FLY_LAYER)
  • The health bar is never being updated to show the current health

    If you don't see any of those problems in your code, then post the relevant sections here and I'll take a look.

    Lummox JR

  • I'm using Spuzzum's lib on it.

    -Kappa the Imp