Limited Size HP bar help [solved]
Posted: Thu Dec 20, 2012 3:28 am
Yes. AGAIN lol, I'm asking this same question for probably the third time. (This is what I get for not using GE in a while hehe). Basically I have a fixed-width canvas, I don't want it to get any bigger or smaller but I want it to be able to "draw" an HP bar. I got the bar drawing but how can I make it equal to the players HP again?
This is a small peice of code for an example, this draws an HP bar but when the HP is full, no matter how large or small I want it to stretch to the size of the canvas instead of increasing in size.
I wont forget again I PROMISE LOL
- Code: Select all
int i;
erase(0, 0, 0, .5);
for(i=0;i<width;i++){
setpen(255, i, 0, 0, 1);
moveto(i, 0);
lineto(i, height);
}
This is a small peice of code for an example, this draws an HP bar but when the HP is full, no matter how large or small I want it to stretch to the size of the canvas instead of increasing in size.
I wont forget again I PROMISE LOL