
06-19-2001, 10:49 AM
|
Banned
|
Join Date: Apr 2001
Location: Station Square
Posts: 984
|
|
A bar would work like this
first you would use this
this.stat = int((hp/maxhp)*pixels);
obviosly you have to change maxhp & pixels to actual numbers, unless you can upgrade you max HP, in which case you would just change pixels to a number. Now anyways let me describe how this works: hp/maxhp turns your hp into a percentage, then * pixels gives you the length (in pixels) the bar should be
then you use showimg 201,x,y;
then you do changeimgvis and set it on statbar layer
then you would use a simple changeimgpart 201,0,0,this.stat,10; to change the bar to it's correct shape (Change 10 to the height of the bar in pixels
|
|
|