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"

Cap Value on Progress Bar?

I know that the progress bars value is a float going from 0 to 1 I have an item pickup that fills this progress bar but I have a cap on the items at 30 so it only fills the bar partially, how do I make it so thirty will fill the bar entirely?

Product Version: UE 4.21
more ▼

asked Feb 21 '19 at 05:29 AM in Blueprint Scripting

avatar image

38 1 2 5

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Use the Map RangeClamped node.

  • Value - Current number of your picked up items (0 to 30)

  • In Range A - Minimum pick up items (0)

  • In Range A - Maximum pick up items (30)

  • Out Range A - Minimum progress bar value (0)

  • Out Range B - Maximum progress bar value (1)

Use the following values:

  • Value - Current number of your picked up items

  • In Range A - 0.0

  • In Range A - 30.0

  • Out Range A - 0.0

  • Out Range B - 1.0

Depending on your Value (ranges from 0 to 30) this will convert the output to range value of 0.0 and 1.0.

more ▼

answered Feb 21 '19 at 05:43 AM

avatar image

1.2k 8 4 7

avatar image Jinkuu Feb 21 '19 at 06:52 AM

Thanks for the help!

avatar image ThompsonN13 Feb 21 '19 at 02:26 PM

theres also the normalize to range node which is a little bit simpler. Or theres always normal math where you would take your current value and divide it by the max which will give you a 0-1 number.

(comments are locked)
10|2000 characters needed characters left
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