Hi there, i need help to come up with a formula for my xp bar made from dialogs. Not the standard one but a custom one using images.
The maximum width of it is 385. I've been twisting and turning just to come to the conclusion i suck at math.
Please help!
All you have to do is set the width of the bar to a ratio based on the maximum width of the bar and the current/maximum exp of the player...
So say your exp is 100/1000. set percent = 100/1000
that comes out to .1
so then set the dialog size to (385*.1,height)
This will make the bar be 10% of its full width, therefore representing you have 10% of the required XP.
Hopefully this helped, kind of short on time so I simpled it up pretty amazingly. Lol.
Using this, the xp bar begins at half when gaining a level.
Let's say at level 1 you need 100 exp to gain a level. At level 2 you need 200 exp to the next level, and have 100 exp from level one. I need 100exp to be 0% of the bar width so it starts over.
alright after having a showdown with the editor I finally got a rough experience bar working. The older editor did not have order of operations, it took me a bit of time to realize what was going on.
so i gave the thor a data exp bar for comparison, and disabled anything that I had done wrong in the triggers but did not delete for maximum DO NOT DO, Hope this helps :D
One quick not so obvious feature is that when you mouse over the bar it shows the current exp, tho i forgot to put in out of so and so maximum experience, but that was just for show.
I have a leveling bar in my leveling library as well, if you'd like to use it. It's not custom though just boss bars.
See down in my sig.
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
To post a comment, please login or register a new account.
Hi there, i need help to come up with a formula for my xp bar made from dialogs. Not the standard one but a custom one using images. The maximum width of it is 385. I've been twisting and turning just to come to the conclusion i suck at math. Please help!
All you have to do is set the width of the bar to a ratio based on the maximum width of the bar and the current/maximum exp of the player...
So say your exp is 100/1000. set percent = 100/1000
that comes out to .1
so then set the dialog size to (385*.1,height)
This will make the bar be 10% of its full width, therefore representing you have 10% of the required XP.
Hopefully this helped, kind of short on time so I simpled it up pretty amazingly. Lol.
I have done this b 4 give me a minute to write a response as well.
Edit: I need to open the editor again lol... I am currently doing some triggering I will post the map when I am done should take a few more mins
Using this, the xp bar begins at half when gaining a level.
Let's say at level 1 you need 100 exp to gain a level. At level 2 you need 200 exp to the next level, and have 100 exp from level one. I need 100exp to be 0% of the bar width so it starts over.
Just working the kinks out now, will post the map when i get the dialog items to show up and respond.
Edit: having more difficulty than I anticipated sorry for the wait :(
Thanks for the asssist :D
alright after having a showdown with the editor I finally got a rough experience bar working. The older editor did not have order of operations, it took me a bit of time to realize what was going on.
so i gave the thor a data exp bar for comparison, and disabled anything that I had done wrong in the triggers but did not delete for maximum DO NOT DO, Hope this helps :D
One quick not so obvious feature is that when you mouse over the bar it shows the current exp, tho i forgot to put in out of so and so maximum experience, but that was just for show.
@Skoite: Go
I have a leveling bar in my leveling library as well, if you'd like to use it. It's not custom though just boss bars.
See down in my sig.