|
09-15-2014, 07:04 AM
|
A Young Mystail Rat
|
|
Join Date: Sep 2014
Server: Unkown
Posts: 4
|
|
Distance meter
Ok so what I'm trying to do it take the distance from target meter and turn it into a colored progress bar.. Like the health bar when it changes colors... IV tryed all kinda stuff but XML coding is not my thing ... So if someone could tell me how to do this I would greatly appreciate it....ty
|
09-15-2014, 10:17 AM
|
|
A Griffon
|
|
Join Date: Aug 2005
Posts: 907
|
|
Quote:
Originally Posted by twistedkilla
Ok so what I'm trying to do it take the distance from target meter and turn it into a colored progress bar.. Like the health bar when it changes colors... IV tryed all kinda stuff but XML coding is not my thing ... So if someone could tell me how to do this I would greatly appreciate it....ty
|
Progress bars have a maximum value (maximum health for example) which allows them to display percentages off of that maximum. In the case of distance to your target which is not absolute, you're not going to be able to give it a maximum that makes sense.
.
|
09-15-2014, 10:55 AM
|
A Young Mystail Rat
|
|
Join Date: Sep 2014
Server: Unkown
Posts: 4
|
|
Quote:
Originally Posted by Darqwood
Progress bars have a maximum value (maximum health for example) which allows them to display percentages off of that maximum. In the case of distance to your target which is not absolute, you're not going to be able to give it a maximum that makes sense.
.
|
.
Ok lets say I want to set my max to 50 how would I do it
|
09-16-2014, 08:07 PM
|
|
A Griffon
|
|
Join Date: Aug 2005
Posts: 907
|
|
Quote:
Originally Posted by twistedkilla
Ok lets say I want to set my max to 50 how would I do it
|
Try this:
Code:
<Progressbar Location="10,10" Name="DistBar" ScrollExtent="120,12" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bar.bar_style" />
<Text DynamicData="/GameData.Target.Distance" Name="Dist_" OnTextChanged="Left=Text" OnMove="
Parent.DistBar.Progress=(Left / 50)
COND=(Left > 0)
 Parent.DistBar.Color=COND ? #FF0000 : Parent.DistBar.Color
COND=(Left > 10)
Parent.DistBar.Color=COND ? #FF5500 : Parent.DistBar.Color
COND=(Left > 20)
Parent.DistBar.Color=COND ? #FFAA00 : Parent.DistBar.Color
COND=(Left > 30)
Parent.DistBar.Color=COND ? #FFFF00 : Parent.DistBar.Color
COND=(Left > 40)
Parent.DistBar.Color=COND ? #00FF44 : Parent.DistBar.Color" />
|
09-17-2014, 09:09 AM
|
A Young Mystail Rat
|
|
Join Date: Sep 2014
Server: Unkown
Posts: 4
|
|
Quote:
Originally Posted by Darqwood
Try this:
Code:
<Progressbar Location="10,10" Name="DistBar" ScrollExtent="120,12" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bar.bar_style" />
<Text DynamicData="/GameData.Target.Distance" Name="Dist_" OnTextChanged="Left=Text" OnMove="
Parent.DistBar.Progress=(Left / 50)
COND=(Left > 0)
Parent.DistBar.Color=COND ? #FF0000 : Parent.DistBar.Color
COND=(Left > 10)
Parent.DistBar.Color=COND ? #FF5500 : Parent.DistBar.Color
COND=(Left > 20)
Parent.DistBar.Color=COND ? #FFAA00 : Parent.DistBar.Color
COND=(Left > 30)
Parent.DistBar.Color=COND ? #FFFF00 : Parent.DistBar.Color
COND=(Left > 40)
Parent.DistBar.Color=COND ? #00FF44 : Parent.DistBar.Color" />
|
DUDE YOUR AWESOME THIS IS WHAT I WAS LOOKING FOR. TY SO MUCH
|
09-17-2014, 12:00 PM
|
A Young Mystail Rat
|
|
Join Date: Sep 2014
Server: Unkown
Posts: 4
|
|
So This Is The Code When I Was Done
Code:
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="34,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="58,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="82,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#FFFFFF" Location="106,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="1,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="33,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="57,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="81,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="105,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="3,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
<Progressbar Location="10,1" Name="DistBar" ScrollExtent="120,12" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bar.bar_style" />
<Text DynamicData="/GameData.Target.Distance" Name="Dist_" OnTextChanged="Left=Text + 1" OnMove="
Parent.DistBar.Progress=(Left / 50)
COND=(Left > 0)
Parent.DistBar.Color=COND ? #00ff00 : Parent.DistBar.Color
COND=(Left > 10)
Parent.DistBar.Color=COND ? #39c700 : Parent.DistBar.Color
COND=(Left > 20)
Parent.DistBar.Color=COND ? #728e00 : Parent.DistBar.Color
COND=(Left > 30)
Parent.DistBar.Color=COND ? #ab5500 : Parent.DistBar.Color
COND=(Left > 40)
Parent.DistBar.Color=COND ? #e41c00 : Parent.DistBar.Color" />
<Image AbsorbsInput="false" BackgroundColor="#FFFFFF" Color="#000000" Location="10,0" Name="Bkguui" PackSize="absolute,absolute" ScrollExtent="138,8" Size="120,12" Style="/SpecialElements.GreyscaleVitalBar.data.bkg.style" />
This Is What Looks Like
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:49 AM.
|
|