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 02-03-2012, 06:57 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Need help with Health GUI.

I have a main GUI that doesn't have the health bar as apart of the image, so i can try to edit the health separately, well the problem is, if i create a new GUIshowimgCtrl for the health, it overlaps the main GUI it's supposed to be apart of and makes it look weird. Does anyone have any suggestions I can use to help fix this?

edit: if something doesn't make sense, let me know.
Reply With Quote
  #2  
Old 02-03-2012, 07:45 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Provide your images, the code you're using to draw it, and what it looks like when it's drawn.
__________________
Quote:
Reply With Quote
  #3  
Old 02-03-2012, 07:11 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
temp.disabled 0x10 0x20 0x40 0x80 0x100 0x200;
  
showstats(allstats temp.disabled);
  new 
GuiShowImgCtrl("GUI_Health") {
    
40;
    
30;
    
width 500;
    
height 130;
    
image "cega_guitest-frozenlies0.png";
    
partx 20;
    
party 10;
    
parth 500;
    
partw 300;
  }
  new 
GuiShowImgCtrl("GUI_HealthBar") {
    
5;
    
65;
    
width 204;
    
height 20;
    
image "cega_guitest-frozenlies0.png";
    
partx 20;
    
party 150;
    
parth 500;
    
partw 300;
  }

Attached Thumbnails
Click image for larger version

Name:	cega_guitest-frozenlies0.png
Views:	177
Size:	8.7 KB
ID:	54255   Click image for larger version

Name:	GuiOverlap.png
Views:	191
Size:	42.5 KB
ID:	54256  
Reply With Quote
  #4  
Old 02-04-2012, 02:32 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Use the partx/party/partw/parth to modify the dimensions of the subimage you're using. If you made that script you'll understand how to use them. If not check the documentation (if it exists).
__________________
Reply With Quote
  #5  
Old 02-04-2012, 02:58 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
there is wiki on it, but it doesn't say much:

http://wiki.graal.net/index.php/Crea...lient/TShowImg

partx: float
party: float
etc..
Reply With Quote
  #6  
Old 02-04-2012, 03:06 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by khortez View Post
there is wiki on it, but it doesn't say much:

http://wiki.graal.net/index.php/Crea...lient/TShowImg

partx: float
party: float
etc..
The names are pretty self-descriptive. The coordinates of the subimage (x/y/width/height).
__________________
Reply With Quote
  #7  
Old 02-04-2012, 03:11 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
The names are pretty self-descriptive. The coordinates of the subimage (x/y/width/height).
It was also just explained in your other thread:
http://forums.graalonline.com/forums...hp?t=134265659

You need to isolate the bar image, and display it over the main GUI.

After you've isolated the bar image, adjust the x and y of the bar GUI until it's in the right position.

Then you can modify the partw depending on your health's ratio. I.e: partw =(hp / hpmax) * bar_width;
__________________
Quote:
Reply With Quote
  #8  
Old 02-04-2012, 03:11 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
In some ways they are, just wish they had a bit more to them is all. but that's just me. ;p


edit: oh and if i read his post correctly, it was what SSSSSS wanted, but in reverse, i wanted one GUI on top of the other. otherwise it looked funny because the health bar would be on top of the other GUI parts even with the partx, party, edit.

Although guys i do thank you anyway ;p i figured out what i needed to do, and you guys answered other questions i had that i was gonna ask later anyway, thanks again

Last edited by khortez; 02-04-2012 at 03:34 AM..
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 08:18 PM.


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