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 10-23-2001, 02:16 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
large status bar ammounts

i know the forumula for status bars, but they dont work if the current ammt goes over the pixel width, it doesnt work anymore.

anyone know how to fix it?
Reply With Quote
  #2  
Old 10-23-2001, 02:30 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
I have a sample that someone gave me. Send me an IM on AIM and I can show you...
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #3  
Old 10-23-2001, 02:30 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Re: large status bar ammounts

Quote:
Originally posted by Warcaptain
i know the forumula for status bars, but they dont work if the current ammt goes over the pixel width, it doesnt work anymore.

anyone know how to fix it?
Why would you need your pixel amount to go over? Maybe I could help you if I better understood what you needed...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #4  
Old 10-23-2001, 02:33 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
I think he means like if its made for 3 hearts (and HP Bar) and they get 4 hearts or something. You just script it to check the number of hearts they have and have the bar be divided into smaller sections.
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #5  
Old 10-23-2001, 02:36 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
I think he means like if its made for 3 hearts (and HP Bar) and they get 4 hearts or something. You just script it to check the number of hearts they have and have the bar be divided into smaller sections.
Use division to get percentages
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #6  
Old 10-23-2001, 02:37 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
hes so smart...
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 10-23-2001, 03:16 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
make sure when bars get to 0 that you make it so it wont try to show a width of 0 in a img part because then it will show a full bar
Reply With Quote
  #8  
Old 10-23-2001, 05:54 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by btedji
make sure when bars get to 0 that you make it so it wont try to show a width of 0 in a img part because then it will show a full bar
Forgot about that part
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #9  
Old 10-23-2001, 06:15 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
no no no.....

like the bomy life system, is based on hp, but if the current ammount of hp goes over the pixel width, it will not show correctly, just the whole image, not the part.
Reply With Quote
  #10  
Old 10-23-2001, 06:25 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
hmmm i think I understand if ure Pic is 100 Pixel and the HP 101 it's a problem hmmm I think u have 2 possibilities:
1. U can only have the same amount of hp as the pixel with
or
2. if the amount of hp is bigger then the pixel with u just show it as full lifes

example:
100 pixel
120 hp (this.hp for example)

if(this.hp <=100){
normal use;
}
else {
showimg ....
changeimgpart index,x,y,int(100),14;
}


so it's not shown if u have more hp but u can't also see the full image...
__________________
No Webhost at the moment
Reply With Quote
  #11  
Old 10-23-2001, 07:03 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally posted by TDO2000
hmmm i think I understand if ure Pic is 100 Pixel and the HP 101 it's a problem hmmm I think u have 2 possibilities:
1. U can only have the same amount of hp as the pixel with
or
2. if the amount of hp is bigger then the pixel with u just show it as full lifes

example:
100 pixel
120 hp (this.hp for example)

if(this.hp <=100){
normal use;
}
else {
showimg ....
changeimgpart index,x,y,int(100),14;
}


so it's not shown if u have more hp but u can't also see the full image...


*confused*

Reply With Quote
  #12  
Old 10-23-2001, 07:05 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
ummm
1. max HP count = pixel width
2. if Hp is bigger just show the full bar and don't use your formular

(Noone understands me *crying*)
__________________
No Webhost at the moment
Reply With Quote
  #13  
Old 10-23-2001, 07:12 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
listen.

if the max hp is 200 and the pixel width is 100, it will get to 100 and still show the part, but then at 101, it will show the full bar, which is bad
Reply With Quote
  #14  
Old 10-23-2001, 07:58 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Warcaptain
listen.

if the max hp is 200 and the pixel width is 100, it will get to 100 and still show the part, but then at 101, it will show the full bar, which is bad
int( ( currenthp / maxhp ) * 100 )
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #15  
Old 10-24-2001, 06:34 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
someone doesnt pay attention to their math classes

should be what xaviar said but u can also do
(maxhp/currenthp)*maxwidth
if ur maxwidth is diff. then 100
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
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 04:28 PM.


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