View Single Post
  #10  
Old 08-07-2011, 09:33 AM
Entrok Entrok is offline
Registered User
Join Date: Sep 2009
Location: Sweden
Posts: 51
Entrok is on a distinguished road
Send a message via MSN to Entrok
Quote:
Originally Posted by Tricxta View Post
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!
Want to fix some of the things i did see in this script

PHP Code:
if (health>0)
{
  
part=(health/maxhealth)*maxwidth//as jazz stated
  
showimg(300"someimage.png"posx+maxwidth-partposy); // where posx and posy are where you want it to sit on the screen
  
changeimgpart(300maxwidth-part0partimageheight);
  
changeimgvis(3004);
}
else 
hideimg(300); 
Reply With Quote