energy bars

BlitzPlus Forums/BlitzPlus Programming/energy bars

Ross C(Posted 2003) [#1]
hey, i wanna add energy bars to the enemys in my space game but i'm a wee bit stuck as how to go about it. each enemy has it's own max hitpoints, current hitpoints , etc.

i tried something like

scaleimage energybar,maxhitpoint/currenthitpoints,1

anyhoo, everytime i scaled the image it scaled it based on it last size, whcih is a problem. i'm too used to 3d

any ideas/help would be magic :D


Binary_Moon(Posted 2003) [#2]
look up the drawimagerect command


Ross C(Posted 2003) [#3]
thanks, that's great. can't belive i overlooked that :S

cheers again


Curtastic(Posted 2003) [#4]
mmmm... energy bars
my favorite is balance bars.


Ross C(Posted 2003) [#5]
lol


DarkEagle(Posted 2003) [#6]
check code archives (i think i put something in there)


Ross C(Posted 2003) [#7]
thanks darkeagle. i've got them working, check out the 2d shoot-em up opinions thread to see them in action. but i'll look at your code none the less, see if it any better

cheers