Quote:
Originally Posted by Gunderak
i was wondering if there is a more efficant way of achiving this without changing the width and having tons of if statements.
|
I dont get why you need tons of if statements o_0
its basically just:
PHP Code:
if (health>0)
{
part=(health/maxhealth)*maxwidth;//as jazz stated
showimg (300,"someimage.png",posx+maxwidth-part,posy);//where posx and posy are where you want it to sit on the screen
changeimgpart (300,maxwidth-part,0,part,imageheight);
changeimgvis (300,4);
}
else hideimg 300;
Or do you have something different? Note this is for a horizontal bar and not a vertical although the same method can be applied
also can who ever neg repped me for this just tell me who you are... im sorry for not knowing gs2! in actual fact since its a person with high rep power im kinda half suspecting who it might be. Sorry for trying to help, I will just refrain for showing an example of what I mean.... YES THATS RIGHT! **** YOU!