x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to have a dynamic Experience bar?

Hey guys,

So i followed the tutorial for the HUD, all works fine.. however the experience bar only goes from 0-1. I have my level up cost changing each time you level up to become more expensive...

How do i set it so the experience bar max number changes to meet this changing cost?

Product Version: Not Selected
Tags:
more ▼

asked Mar 17 '15 at 08:11 AM in Blueprint Scripting

avatar image

MikeDog
8 3 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I would suggest having two variables in your widget blueprint, Exp and MaxExp. Then, bind your progress bar to a function GetExpProgress, which simply returns Exp / MaxExp. When your character levels up, update the widget's MaxExp variable, and any time your character gains experience, update the Exp variable.

This is assuming that your Exp gets reset to zero as soon as you level up. If that's not the case, then you probably want to also store the previous level's MaxExp somewhere, and GetExpProgress would look like

(Exp - PrevMaxExp) / (MaxExp - PrevMaxExp)

more ▼

answered Mar 17 '15 at 08:34 AM

avatar image

veggiesaurus
529 20 21 61

avatar image MikeDog Mar 17 '15 at 09:09 AM

Worked perfect, can't believe it was just xp / max xp....I obviously don't do maths....

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question