Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.