Game Development Community

Simple Health Bar

by Joe Banko · in Technical Issues · 03/10/2008 (8:28 pm) · 2 replies

I'm looking for an example of a SIMPLE health indicator. I'd like to have it attached to my player sprite but it could also exist in a HUD. I keep seeing posts for a GuiHealthBar but it looks like that has to be compiled into the game engine. Are there any examples of a health bar that doesn't have to be compiled into the engine and comes standard with TGB. I can come up with pretty much any sort of art that I need to support it but I'm looking for some code examples as well.

thanks,

Joe B

#1
03/10/2008 (9:46 pm)
In the behaviors section, on the TDN, there is a behavior that does something like this.
#2
03/10/2008 (10:08 pm)
Thanks Ben. But there are no examples with graphics. I have a general idea but can't seem to get it to work. So I don't know if it's my graphics or something with my code. Still looking for my Holy Grail of assigning behaviors programmatically. I've posted this question a couple of times and gotten no answers so I've decided to just add it to ALL of my threads and maybe I'll get someone who knows.

Thanks again,

Joe B