This panel stays in the same position where you put it, no
matter
what the screen resoution is set at.
Has number digits for ammo and a red bar for health.
Be sure to copy the:Termin10.bmp, pan1pic.BMP, and
health.pcx
into your work folder.
Enjoy,
the Mad Dog 11-25-01
//////////////////This goes above "function main()"///////////////////
FONT pan1_font,<Termin10.bmp>,14,16;
BMAP panel1 <pan1pic.BMP>;
bmap health_map = <health.pcx>;
var ammopan = 0;
var hbar = 0;
/////////////////////////////////////
/////////// This goes at the bottom in "function
main()"//////////
// call further functions here...
md1panel();
//}
///////////////This goes in the level
script//////////////////
panel hbar_pan
{
hbar 50,0,50
health_map,1,player._health;
pos_x=38;
layer = 2;
FLAGS OVERLAY;
FLAGS REFRESH;
//FlAGS TRANSPARENT;
}
//////////////////////////////////////////////////////////////
////////////////panel script//////////
Panel square_Pan
{
BMAP panel1;
POS_X=10;
LAYER 1;
FLAGS OVERLAY;
FLAGS REFRESH;
//FLAGS TRANSPARENT;
}
panel digpan1
{
pos_x 25;
digits 0,0,3,pan1_font,1,ammopan;
FLAGS OVERLAY;
FLAGS REFRESH;
//FLAGS TRANSPARENT;
}
function md1panel()
{
digpan1.visible =
ON;
hbar_pan.VISIBLE =
ON;
square_Pan.VISIBLE=ON;
while(1)
{
digpan1.pos_y =
screen_size.y -36;
square_Pan.POS_Y=SCREEN_SIZE.Y
- 45;
hbar_pan.POS_Y =
SCREEN_SIZE.Y - 33;
if(ammo_number == 0) { ammopan = 0; }
if(ammo_number == 1) { ammopan = ammo1; }
if(ammo_number == 2) { ammopan = ammo2; }
if(ammo_number == 3) { ammopan = ammo3; }
if(ammo_number == 4) { ammopan = ammo4; }
if (PLAYER !=0){
hbar = player._HEALTH;
}
wait(1);
}
}