|
09-01-2005, 01:03 PM
|
A Young Mystail Rat
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
|
|
progress bar question
having issues creating a progress bar of a data type that isn't rounded off to even numbers, or at least, that's the only difference i can figure.. most percentile variables in the game are round, ie: 0-100 percent.. however, there's at least 2 that carry a tenths place.. ie: 0.0-100.0 percent.. and that seems to make a difference in that i can't seem to get the bar to update, anyone have any clues on how to get /GameData.Stats.Defense_MitigationPercent to update correctly in a bar?
Edit: anyone know if there's a data filter that would round off the decimal? basically making the result into an integer?
Last edited by chylder : 09-01-2005 at 02:11 PM.
|
09-01-2005, 02:59 PM
|
|
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
The displayed text % (45.6%) and the Progress value used by the bars (0.456) are actually seperate data filters. Text is 0x0002, Progress is 0x0040.
My guess is that Progress isn't sent for Defense_MitigationPercent, which is why you can't get a progress bar working for it. If that is the case, there's nothing we can do. We can't use a script to convert from Text to Progress if the text already has a % sign, and even if we could, you'd have use an OnEvent like hovering over the bar to get it to update.
__________________
If it ain't broke, it needs more features!
|
09-01-2005, 03:17 PM
|
A Young Mystail Rat
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
|
|
the text doesn't carry a %, but how would you go about scripting a change like that, even with an OnEvent?
|
09-01-2005, 03:30 PM
|
Slayer of clock cycles
|
|
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
|
|
If it even would work, you would have do somthing like this.
<Text Name='ValueHolder'... DynamicDatat='what erver dada u want'>.456</Text>
<What_ever OnHoverIn='(line 1 convert math) Progress_bar.Position=ValueHolder.LocalText' />
Somthing along those lines is what your looking for but as Deathbane said it's porb not going to fly .
|
09-01-2005, 03:45 PM
|
|
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
Text doesn't carry a %? Excellent.
Here's the script you'll want for the bar:
OnHoverIn="Progress=((Parent.DefenseMitigationTextObject.Localtext)/100)"
__________________
If it ain't broke, it needs more features!
|
09-01-2005, 03:54 PM
|
Slayer of clock cycles
|
|
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
|
|
Hmm in that case, I would add the dynamic data to a slidbar and use the onchange event to update the progressbar, no hover event needed then. That is if the slidebar will take that sort of data.
|
09-01-2005, 04:16 PM
|
A Young Mystail Rat
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
|
|
ok, making some progress.. i got the bar to update with onhover, it just doesn't seem to be reading anything from Parent.DefenseMitigationTextObject.Localtext
in other words, it's emptying on hover.. i like the idea of an onchange, (as in this case, it's not like mitigation is going to be changing all that often anyway) but i'm still a little fuzzy on exactly how one goes about this. any chance of getting that from you guys a lil slower? i don't normally do a whole lot of UI modding, and it's been almost 15 years since i've been employed for my programming skills
and in any case, thanks abunch for the speedy responses so far
|
09-01-2005, 04:23 PM
|
|
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
Quote:
Originally Posted by Landiin
Hmm in that case, I would add the dynamic data to a slidbar and use the onchange event to update the progressbar, no hover event needed then. That is if the slidebar will take that sort of data.
|
Nope, there's no DynamicData for the Value and FloatValue data that sliders use, and OnChange doesn't trigger when DynamicData updates. Requires player input. :/ Tried that already.
The final thing should look something like...
<Text Name="DefenseMitigationTextObject" DynamicData="/GameData.Stats.Defense_MitigationPercent" ...>
<Progressbar OnHoverIn="Progress=((Parent.DefenseMitigationTextObject.Localtext)/100)" ...>
The "..." parts will need to have location, style info, etc.
__________________
If it ain't broke, it needs more features!
Last edited by Deathbane27 : 09-01-2005 at 04:26 PM.
|
09-01-2005, 04:48 PM
|
A Young Mystail Rat
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
|
|
is there anything special that needs to be involved with the text object? I mean.. is the style, location, whatnot.. actually important for it, or is it just the placeholder that i think it is?
currently still empty, double checking to make sure i didn't break something silly while i was trying to figure it out earlier..
Edit:
/sigh.. nm that.. i was mistaken. since i hadn't expected the extra area of the decimal and tenths place, the size i'd allocated for the Defense_MitigationPercent wasn't quite big enough.. and there is a % included with it, which is why it's not returning anything when it's /100.. since that text object was inside another page, i didn't notice the sizing was cut so close, and i'd already placed a '%' text object next to it.. so when i'd log in.. i'd see the buffed mitigation number in green, with the % (which was actually below the other text object) staying white.. so i figured it wasn't included.. i never even thought about the fact that i hadn't taken into account for the extra size..
So, unless there's a handy way to truncate off the last character of a string and turn the remainder into a number.. i guess that sinks that idea
but, it's definitely been a learning experience, thanks again for the help
Last edited by chylder : 09-01-2005 at 05:06 PM.
|
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 08:55 AM.
|
|