I'm trying to create healthbars for everything in my game. Here is the basic code below and it's simply not working. I added the malloc line because I wasn't sure if I needed to allocate memory for the panel. It didn't help the problem so I'm guessing the answer is no.

Code:
	var pHealthBar1 = 50;
	PANEL* myHPpanel = malloc(sizeof(HPpanel));
	myHPpanel = pan_create("flags = VISIBLE;window (0, 0, 100, 10, healthbar_bmp, pHealthBar1, 0);",4);
//	pan_setvar(myHPpanel,5,1.0,&pHealthBar1);
	pHealthBar1 = (100*(player.hplvl-pHealth)/player.hplvl);


I just thinking having health bars over every monster will look cool and it's killing me that I can't get this to work. Anyone have any ideas what's going on? The formula for the player health is right because when I define a panel in SED everything works right. Obviously I can't define 1000 health bars for every single possible monster, And I don't feel like just making 20 and having them all share. As a last resort I'll do that.

Last edited by PrenceOfDarkness; 11/25/08 22:15.

"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.