hmm....i tried both the healthbars there for my 3D game, but neither of them showed up. I followed the directions exactly and im not getting any errors there just not there??? here's a snippet. What am i doin wrong?
Draw to Front
...
rem Minimum, Maximum, and Current HP
MinHP# = 0
MaxHP# = 200
CurHP# = 200
rem How many pixels long do we want the bar
pixlength = 500
pixheight = 10
rem XY location of bar on the display
x = 275
y = 30
...
do
rem Update input data
UpdateKeyHold()
rem Display screen data
set text size 22
text 0, 0, "FPS: "+str$(screen FPS())
text 0, 30, "Enemies Killed: "+str$(enemys_killed)
UpdateFollowCamera()
UpdatePlayer()
healthbar(x,y,MinHP#,MaxHP#,CurHP#,pixlength,pixheight)
UpdateEnemyAI()
UpdateElevator()
RunCollisionPRO()
CheckExit()
sync
loop
...
function healthbar(x as integer, y as integer, MinHP# as float, MaxHP# as float, CurHP# as float, pixlength as integer, pixheight as integer )
rem The Math
rem some conditions so that you don't go negative on certain values
if CurHP# < MinHP# then CurHP# = MinHP#
if CurHP# > MaxHP# then CurHP# = MaxHP#
if pixlength < 1 then pixlength = 1
if pixheight < 1 then pixheight = 1
rem Change our values from Integers to a percent so that we can see how much of the bar needs to be filled
pBar# = CurHP# / MaxHP#
rem Get the percentage of the bar to be filled
thebar = int(pixlength * pBar#)
rem Draw the bar
box x,y, x + thebar, y + pixheight
line x + pixlength, y, x + pixlength, y + pixheight
line x,y, x, y + pixheight
endfunction CurHP#
Purple Heart - The Ultimate WWI FPS on DBPro
http://www.geocities.com/andrewdewitt55