okay can i get a lil understanding on how to create a window because Its just not working properly like i can get the lifebar frame and life bar it self to display but i cant get the bar to shift when player life is being taken!!!

BMAP hud_bmp = "hudtemp.tga";
PANEL hud
{
pos_x = 550;
pos_y = 397;
layer = 3;
flags = OVERLAY;
bmap = hud_bmp;
}

BMAP life_bar = "life.bmp";
PANEL lifeb
{
pos_x = 567;
pos_y = 523;
window(0,0,103,11,life_bar,healthstat,1);
layer = 2;
}

..
..
..
..
healthstat = (player.healthpoints/103)*100; //located in the player action.


i dont know how to properly use this function help please