![]() |
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? |
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. |
the text doesn't carry a %, but how would you go about scripting a change like that, even with an OnEvent?
|
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:(. |
Text doesn't carry a %? Excellent.
Here's the script you'll want for the bar: OnHoverIn="Progress=((Parent.DefenseMitigationTextObject.Localtext)/100)" |
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.
|
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 |
Quote:
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. |
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 |
| All times are GMT -5. The time now is 12:29 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI